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....
1 Reply
Know the answer? Post it — somebody with the same question will find it here.
Sign in to answer this question
It is the same account you read, post and publish with — and you will come straight back to this page.

Rajeev PunhaniPosted Apr 8, 2016, 9:38 AM
If the above solution is helpful then,accept the answer.