Display label value outside the Gridview textboxHi,
I have label value inside the Gridview ItemTemplate and i have a button inside the gridview
my requirement is when i click the inside the gridview button, i want to display the label value to text box. But this textbox is outside the gridview.
I tried but label value was not displayed in the textbox.
Here i paste my code could anybody guide to me whats wrong in my code.
protected void btnUpdate_Click(object sender, EventArgs e)
GridViewRow gv = ((Button)sender).Parent.Parent as GridViewRow;
Label lblTaskName = (Label)gv.FindControl("lblTaskName");
string strTaskName = lblTaskName.Text.ToString();
txtTask.Text = strTaskName ; // this TextBox is out side the gridview
I got the label value but value not displayed in the textbox
thanks and regards