Current location: Hot Scripts Forums » Programming Languages » ASP.NET » Dynamic Control Values


Dynamic Control Values

Reply
  #1 (permalink)  
Old 09-27-04, 01: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
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
  #2 (permalink)  
Old 11-15-04, 12:28 AM
thuenb thuenb is offline
Newbie Coder
 
Join Date: Oct 2004
Location: MI
Posts: 43
Thanks: 0
Thanked 0 Times in 0 Posts
DataGrid

Try using a datagrid control instead... Use can then create a template column, and the information will be properly setup... Basically takes care of the whole persistance and viewstate problem. You can setup a Datagrid to have one column and then put all of the data inside that column just like a datalist.

Hope this helps...
__________________
Best Regards,
Brian Thuen
http://www.AdvisedSolutions.com
Digg this Post!Add Post to del.icio.usBookmark Post in TechnoratiShare on FacebookShare on Stumble UponShare on Twitter
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
The most COMPLETE gaming control panel for gamers and game hosting Game Panel Don General Advertisements 2 09-13-04 11:08 PM
Help with dynamic select in dynamic table noviceforever JavaScript 1 06-23-04 02:20 PM
Cell with dynamic control candykung ASP.NET 1 12-25-03 01:17 AM
MySQL table problem perleo PHP 9 12-16-03 02:16 PM
asp: values in array not in order?? seala ASP 0 08-16-03 01:06 PM


All times are GMT -5. The time now is 06:48 AM.
vBulletin® Copyright ©2000 - 2012, Jelsoft Enterprises Ltd.