I have an .aspx page using System.Net.Mail
for sending E-Mail messages.
A linkbutton
click event causes this sending process. As you know, I cant disable LinkButton
's PostBack event. It means, when user hits the link, mail sending process occurs, and page posts back. I need to avoid this post back process. So, I need to use Ajax Update Panel
, but a开发者_运维问答ctually I'm not really good at ASP.NET. My question is, how can I use Ajax Update Panel to send mail without post back?
Here is my LinkButton
's Source:
<tr>
<td>
<asp:LinkButton class="button" runat="server" OnClick="Button1_Click" ID="bas"><img src="button.png" alt="" />Convert / Cevir</asp:LinkButton>
</td>
</tr>
You can use update panel like this. Moreover don't forget you create the <asp:scriptmanager>
on the page.
<tr>
<td>
<asp:updatepanel id="updatepnl1" runat="server">
<contenttemplate>
<asp:LinkButton class="button" runat="server" OnClick="Button1_Click" ID="bas"><img src="button.png" alt="" />Convert / Cevir</asp:LinkButton>
</contenttemplate>
</asp:updatepanel>
</td>
</tr>
精彩评论