hi
I have gridview in my page that users can edit their data in gridview below is code:
<asp:GridView ID="GridView1" runat="server" CssClass="DGridView1"
AutoGenerateColumns = "false" Font-Names = "Tahoma"
Font-Size = "9pt"
HeaderStyle-BackColor = "#e0e0e0"
OnPageIndexChanging = "OnPaging" onrowediting="EditCustomer"
onrowupdating="UpdateCustomer" onrowcancelingedit="CancelEdit"
GridLines = "Both" OnRowDataBound = "OnRowDataBound"
>
I define Lable in gridview that I want when users click on edit it show s some text in this lable so I wrote editcustomer metod like below:
protected void EditCustomer(object sender, GridViewEditEventArgs e)
{
Label3.Text = "neda";
GridView1.EditIndex = e.NewEditIndex;
BindData();
BindData1();
}
but this error happen:
the name "lable3" doesn't exist in current context
I know becuse I define it in gridview it can't recognise but how I can solve it?
Best regards
Neda