Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Finding controls in datalist

Status
Not open for further replies.

Anakin2112

Programmer
Feb 20, 2003
9
0
0
US
I have looked everywhere with no success.

Is there a way to find out what controls are in a data list?
The controls in the datalist would be created dynamically when the page is created. I have no problem creating the controls, but I cant retrieve the control's value when I submit the page? Any advice would be greatly appreciated.
 
Use the .FindControl on the closest container that your code knows the control is in.


dim mine as control = datalist.index(row).findcontrol("controlID")

response.write(mine.text)
That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
thanks for the reply, but it is not working. It returns nothing.
 
Are you sure the control is there? Can you see it on the page?

If your sure that it is there and you can see it, then did you assign it's id to something before you added it to the controls collection of the datalist? That'l do donkey, that'l do
[bravo] Mark
If you are unsure of forum etiquette check here faq796-2540
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top