Hello,
I want to send mail on gridview click,
How to call Ajax Method or funtion to Gridview Template field Button to send mail nd check weather email id exist or not, if not alert message to show message, how to achieve it.
<asp:GridView ID="gridData" runat="server" AutoGenerateColumns="False" DataKeyNames="DutyID" class="table table-striped table-bordered"
OnRowDataBound="OnRowDataBound" Visible="False" AllowPaging="true" PageSize="5" OnPageIndexChanging="OnPaging" PagerStyle-CssClass="gridfooter">
<Columns>
<asp:ButtonField ButtonType="Image" CommandName="SELECT" HeaderText="Edit" ImageUrl="~/images/edit.png">
<ItemStyle Width="1px" />
<HeaderStyle Width="1px" ForeColor="Green" />
</asp:ButtonField>
<asp:BoundField DataField="CUSTNAME" HeaderText="Customer Name" HtmlEncode="false">
<HeaderStyle HorizontalAlign="Left" Wrap="false " />
</asp:BoundField>
<asp:BoundField DataField="Destination" HeaderText="Destination">
<HeaderStyle HorizontalAlign="Left" Wrap="false " />
</asp:BoundField>
<asp:TemplateField HeaderText="MAIL" HeaderStyle-ForeColor="Red">
<ItemTemplate>
<asp:ImageButton ID="btnMail" runat="server" CommandName="SMS" AlternateText="Send MAIL" ImageUrl="~/images/mail.png" />
</ItemTemplate>
</asp:TemplateField>
</Columns>
<PagerSettings PageButtonCount="15" />
<PagerStyle CssClass="gridfooter"></PagerStyle>
</asp:GridView>