Skip to content

How to get gridview text box values within button in c#

Raja A

Asked Dec 22, 2013, 5:42 AM EST1 answer
Share
LinkedInX
How to get grid view textbox value within submit button .. Button should be outside from gridview..... Can anyone help with code...

1 Answer

Know the answer? Post it. Somebody with the same question will find it here.

  • 0
    protected void btnSave1_Click(object sender, EventArgs e) { GridViewRow row = (GridViewRow)((Button)sender).NamingContainer; TextBox TextBox1 = row.FindControl("TextBox1") as TextBox; //Access TextBox1 here. string myString = TextBox1.Text; }
    0