471,073 Members | 1,365 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,073 software developers and data experts.

Handling dynamically generated textbox in a datalist

Hi Group,

I am creating a ASP.NET (C#) project.
I am creating a datalist with some dynamically generated text boxes in the
edit template.
I have the datalist control on the form. The text box is written on the form
at run time.
Using Response.Write() on the EditTemplate I write the HTML code required
for the text box along with the data and the ID for the text box.

On the Update event of the datalist I try to read the value from the text
I am doing a FindControl (<text box id which was inserted into the HTML
But I get an 'Object reference not set to an instance of an object' error.

When I put a text box in the EditTemplate of the datalist at the design
time, I can read the values of the data in it.
But the same does not happen when the text box is created on run time...

How can I read the data from the text box created at run time.
Should I use a different method of creating a text box at run time, instead
of writing the HTML code on the form.

Thanks in advance,
Nov 18 '05 #1
0 1134

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

reply views Thread by Barry | last post: by
4 posts views Thread by Shiju Poyilil | last post: by
12 posts views Thread by scsharma | last post: by
7 posts views Thread by Nathan Sokalski | last post: by
reply views Thread by leo001 | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.