Button Click Event Inside GridView Using Asp.Net C#

Button Click Event Inside GridView


Get the Values From Runtime Gridview  Pass Next  Form Use to Button  in This Method


               C# Coding


   protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e)
    {

         Button btn = (Button)sender;

        GridViewRow gr = (GridViewRow)btn.NamingContainer;

        Label sendermail = (Label)gr.FindControl("Label10");

        TextBox name = (TextBox)gr.FindControl("txtname");

        TextBox mobile = (TextBox)gr.FindControl("txtmobile");

        TextBox mail = (TextBox)gr.FindControl("txtemail");

        TextBox message = (TextBox)gr.FindControl("txtmessage");


}



0 comments:

Post a Comment