I have to include a link named 'Mail' inside of the each GridView Rows. While clicking that gridview link i have to send an email message...please help me....
Default.aspx
onselectedindexchanged="GridView2_SelectedIndexChanged" OnRowCommand="GridView2_RowCommand" OnRowDeleting="GridView2_RowDeleting" >
Default.aspx.cs
protected void GridView2_SelectedIndexChanged(object sender, EventArgs e)
{
}
protected void GridView2_RowCommand(object sender, GridViewCommandEventArgs e)
{
if(e.CommandName=="Delete")
{
var client = new SmtpClient("smtp.gmail.com", 587)
{
Credentials = new NetworkCredential("[email protected]", "123@"),
EnableSsl = true
};
client.Send("[email protected]", "[email protected]", "test", "Your Auction Price has been fixed for this Product. Inorder to Complete your Purchase kindly pay the Auction Amount");
Response.Write("");
}
}
protected void GridView2_RowDeleting(object sender, GridViewDeleteEventArgs e)
{
}
i tried the above code but i did not get any link inside of my gridview. Help me please....


Rajeev PunhaniRank #551 · 4.4K reputationPosted Apr 8, 2016, 5:38 AM EDT
asp:Button ID="deletebtn" runat="server" CommandName="Delete" Text="Delete"If the above solution is helpful then,accept the answer.