Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / October 2007

Tip: Looking for answers? Try searching our database.

Dynamically created controls not refreshed

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Dwight Johnson - 19 Oct 2007 15:21 GMT
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.
Dwight Johnson - 19 Oct 2007 18:50 GMT
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?
Dwight Johnson - 19 Oct 2007 19:20 GMT
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.

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.