View Single Post
  #1 (permalink)  
Old 09-27-04, 12:49 PM
khan_mansoor khan_mansoor is offline
New Member
 
Join Date: Sep 2004
Posts: 1
Thanks: 0
Thanked 0 Times in 0 Posts
Question Dynamic Control Values

Hello,

I am new to ASP.NET. I am facing a problem when trying to access values of a dynamically created textbox.

Here is my situation

I have the following hierarchy Page -> User Control -> Data List -> PlaceHolder -> TextBox/Drop Down.

I create my dynamic control using a Placeholder. The dynamic controls are created in the ItemDataBound event of the DataList. I am trying to access the values of these dynamic controls in the Save button OnClick event using the PlaceHolder.FindControl ("id"), but with no success. The control is not being found.
After reading few articles I found out that dynamic controls are usually lost when there is a postback event and you have to recreate them.
Can anybody point me in the right in order to solve this issue.

Thanks
Mansoor
Reply With Quote