Re: Text from TextBox in DataList

Tech-Archive recommends: Fix windows errors by optimizing your registry



You need first get to the item, something like

TextBox tb = (TextBox)GradeDataList.Items[i].FindControl("GradeTextBox");


--
Eliyahu Goldin,
Software Developer & Consultant
Microsoft MVP [ASP.NET]
http://msmvps.com/blogs/egoldin


"etam" <odwrotnie@xxxxxxxxx> wrote in message
news:1180549263.635323.268780@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
On 30 Maj, 20:55, "Eliyahu Goldin"
<REMOVEALLCAPITALSeEgGoldD...@xxxxxxxxxxxx> wrote:
First get to the item, then to the textbox:
TextBox myTextBox = myItem.FindControl("GradeTextBox") as TextBox;

TextBox tb = (TextBox)GradeDataList.FindControl("GradeTextBox");

Then tb == null :/.

But still it is strange... Beacause My GradeDataList has many
GradeTextBoxes. Am I right?



.



Relevant Pages

  • Re: Create a page with empty response
    ... It is strange to me since I do have an application ... Software Developer & Consultant ... Microsoft MVP ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: streaming images
    ... Software Developer & Consultant ... Microsoft MVP ... I have a ADO.NET dataset that contains a jpeg (blob data) and some ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: label in footertemplate of datagrid
    ... Software Developer & Consultant ... Microsoft MVP ... FooterTemplate of the DataList control? ...
    (microsoft.public.dotnet.framework.aspnet)
  • Re: DateTimePicker
    ... >> William Vaughn ... >> Author, Mentor, Consultant ... >> Microsoft MVP ...
    (microsoft.public.dotnet.framework.adonet)
  • Re: ArgumentException on setting ConnectionString
    ... >> Author, Mentor, Consultant ... >> Microsoft MVP ... >> INETA Speaker ...
    (microsoft.public.dotnet.framework.adonet)