Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Q: dynamically created databound controls persist but static controlsdon't

Reply
Thread Tools

Q: dynamically created databound controls persist but static controlsdon't

 
 
mad.scientist.jr@gmail.com
Guest
Posts: n/a
 
      04-03-2008
I am running into a case where I am databinding a control
(dropdown, checkboxlist, etc) to a datatable,
caching the datatable in session,
and on postback rebind the control.
After postback the control loses its value.
However if I try this with a dynamically created control,
it maintains state just fine.
(I would think it would be the other way around.)

You can cut/paste my aspx and codebehind into your project from here:
http://www.geocities.com/usenet_daug...sist_issue.htm

How would you get the static control (CheckBoxList1)
to maintain state after postback?
I am curious why this is happening.

Thanks
 
Reply With Quote
 
 
 
Reply

Thread Tools

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Affecting a dynamically created drop down from another dynamically created drop down. msimmons ASP .Net 0 07-16-2009 03:17 PM
databound custom controls vs composite databound custom controls rodchar ASP .Net 0 11-26-2007 03:51 PM
how to persist event handlers for dynamically created web controls Dica ASP .Net 1 06-20-2007 03:04 PM
templated databound control problem - not showing databound Manu ASP .Net Web Controls 0 05-22-2006 09:46 AM
Managing ViewState of a dynamically created Custom Composite Server Control -(where the original is also dynamically created) dickster ASP .Net Building Controls 0 12-08-2005 09:32 AM



Advertisments