Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Dynamically created controls not refreshed

Reply
Thread Tools

Dynamically created controls not refreshed

 
 
Dwight Johnson
Guest
Posts: n/a
 
      10-19-2007
I am building a website in VS2005. I basically have one page,
default.aspx, which contains placeholder objects into which I add
various controls that are dynamically created. I have a dropdownlist
that is created in the InitializeComponent event so I can do a
FindControl on it later to determine its new value when it is
selected. Based on this new value I will then get data from a database
and fill another placeholder on the page with a dynamically built
table containing labels and textboxes filled with the new data. This
process happens in the Page_Load, regardless of the state of
IsPostBack. When I debug the process, the dynamically-created controls
are all populated with the new data, but when the page appears, the
only data I ever see is the data from the first time that the page
loaded. Any ideas? I have done this same thing in VS2003 without a
problem. I'm completely baffled by this one.

 
Reply With Quote
 
 
 
 
Dwight Johnson
Guest
Posts: n/a
 
      10-19-2007
Just to clarify, I added a dropdownlist to the group of textboxes, and
the dropdown list always reflects the new data (?!) while the
textboxes remain unchanged.

Also, the new data appears in the textboxes when I return to the page
using a link on the page with a different querystring, but not when I
do an autopostback on the original dropdownlist that determines which
set of data is loaded into the page.

Is any of this making any sense to anyone?

 
Reply With Quote
 
 
 
 
Dwight Johnson
Guest
Posts: n/a
 
      10-19-2007
One more thing. When I made the textboxes ReadOnly = true, they all
get refreshed!

The good news is, my problem is solved.
The bad new: I still have no idea why.

 
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
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
VS2005 ASP.NET 2.0 does not fire event for dynamically created custom web controls Amelyan ASP .Net 2 11-05-2005 05:29 PM
Dynamically created controls not accessible on postback Tim Greenwood ASP .Net 1 05-13-2005 11:41 AM
Dynamically Created User Controls not Initialising John Sewell ASP .Net Web Controls 1 09-05-2004 01:59 PM



Advertisments