Ask a Question related to ASP.NET General, Design and Development.
-
VB Programmer #1
Tricky Question: Page_Load
I have a usercontrol that sets a public/shared variable called
"database_name". (User selects a dropdownlist of available databases.) A
webform (webform1), that uses this usercontrol, connects to the database
defined by that public variable and does stuff.
Problem: Webform1 is always one database "behind". This is because the
Page_Load runs on webform1, THEN Page_Load is run on the usercontrol (which
sets the database_name variable).
Any ideas how I can fix this/compensate?
Please assist.
Thanks,
Robert
VB Programmer Guest
-
Page_Load called more than once for user control - newbie question
Hi, I have a page with a user control as header, which in turn has a user control drop down list. When I run the page in debug with a break on... -
it's tricky!
hello, hoping there's a easy solution to this...i am making an html page in dreamweaver and i have an animated flash character in the corner. this... -
Tricky Recordset Question: HELP!
I'm not sure where your problem is. You describe some things you've tried, but you don't explain what goes wrong when you try them ... I think we... -
A tricky one?
Hi, I wonder if anyone can help me with this? Using A2K, I have a continuous form, which is constantly requeried every 10 seconds using the timer... -
Tricky Dynamic SQL question
Im new to this project and its in rapid development so there is little or no documentation so please bare with me. We have supertype tables that... -
William F. Robertson, Jr. #2
Re: Tricky Question: Page_Load
You don't want to put any actually "processing" functionality into page
load. You should be doing any processing in an event such as a click, that
way all controls (both user and asp) have a chance to run their load event.
The data for the controls in the page_load isn't guaranteed to be up to
date.
HTH,
bill
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:uSt4$czPDHA.1584@TK2MSFTNGP11.phx.gbl...(which> I have a usercontrol that sets a public/shared variable called
> "database_name". (User selects a dropdownlist of available databases.) A
> webform (webform1), that uses this usercontrol, connects to the database
> defined by that public variable and does stuff.
>
> Problem: Webform1 is always one database "behind". This is because the
> Page_Load runs on webform1, THEN Page_Load is run on the usercontrol> sets the database_name variable).
>
> Any ideas how I can fix this/compensate?
>
> Please assist.
>
> Thanks,
> Robert
>
>
William F. Robertson, Jr. Guest
-
charles #3
Re: Tricky Question: Page_Load
You could take the code out of page_load and put it into page_prerender.
Then it will run after all your controls preload
"VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
news:uSt4$czPDHA.1584@TK2MSFTNGP11.phx.gbl...(which> I have a usercontrol that sets a public/shared variable called
> "database_name". (User selects a dropdownlist of available databases.) A
> webform (webform1), that uses this usercontrol, connects to the database
> defined by that public variable and does stuff.
>
> Problem: Webform1 is always one database "behind". This is because the
> Page_Load runs on webform1, THEN Page_Load is run on the usercontrol> sets the database_name variable).
>
> Any ideas how I can fix this/compensate?
>
> Please assist.
>
> Thanks,
> Robert
>
>
charles Guest
-
VB Programmer #4
Re: Tricky Question: Page_Load
This worked GREAT! Thanks!
"charles" <charles@synthigence.com> wrote in message
news:eRriy3zPDHA.3664@tk2msftngp13.phx.gbl...A> You could take the code out of page_load and put it into page_prerender.
> Then it will run after all your controls preload
>
> "VB Programmer" <growNO-SPAM@go-intech.com> wrote in message
> news:uSt4$czPDHA.1584@TK2MSFTNGP11.phx.gbl...> > I have a usercontrol that sets a public/shared variable called
> > "database_name". (User selects a dropdownlist of available databases.)> (which> > webform (webform1), that uses this usercontrol, connects to the database
> > defined by that public variable and does stuff.
> >
> > Problem: Webform1 is always one database "behind". This is because the
> > Page_Load runs on webform1, THEN Page_Load is run on the usercontrol>> > sets the database_name variable).
> >
> > Any ideas how I can fix this/compensate?
> >
> > Please assist.
> >
> > Thanks,
> > Robert
> >
> >
>
VB Programmer Guest



Reply With Quote

