R
R.A.M.
Hello,
I am learning ASP.NET.
On .aspx page I have a data-list with text-box that I would like to read
during line modification.
<aspataList ...
OnEditCommand="Sample_Edit" >
...
<EditItemTemplate>
...
<asp:TextBox ID="SampleEdit" runat="server" />
...
</EditItemTemplate>
...
</aspataList>
In code-behind I have:
protected void Sample_Edit(object sender, DataListCommandEventArgs e)
{
...
string Sample = ((TextBox)e.Item.FindControl("SampleEdit")).Text;
// here problem
...
}
The problem is that although e.Item is fine, FindControl returns null.
Could you help me to programme it correctly?
Thank you !!!
/RAM/
I am learning ASP.NET.
On .aspx page I have a data-list with text-box that I would like to read
during line modification.
<aspataList ...
OnEditCommand="Sample_Edit" >
...
<EditItemTemplate>
...
<asp:TextBox ID="SampleEdit" runat="server" />
...
</EditItemTemplate>
...
</aspataList>
In code-behind I have:
protected void Sample_Edit(object sender, DataListCommandEventArgs e)
{
...
string Sample = ((TextBox)e.Item.FindControl("SampleEdit")).Text;
// here problem
...
}
The problem is that although e.Item is fine, FindControl returns null.
Could you help me to programme it correctly?
Thank you !!!
/RAM/