barski Posted September 15, 2003 Posted September 15, 2003 What is the order of page events? I have a weborm with three textboxes and when the page finishes loading it displays the values I sent to them via javascript on the "body load event". However, I can't seem to find any event that has the textboxes containing these values. I'm need the values to send parameters to sql. Unless there's some way to send the java values the the routine in codebehind page. I know about attributes.add but I want the query to fire when the page is opened. Quote
Moderators Robby Posted September 16, 2003 Moderators Posted September 16, 2003 I don't understand what you mean by this... "I can't seem to find any event that has the textboxes containing these values." I'm not sure which event you want ? Quote Visit...Bassic Software
*Gurus* Derek Stone Posted September 16, 2003 *Gurus* Posted September 16, 2003 You can't. The page can't magically query a database without knowing values that haven't been entered at the time the page is compiled. You'll need to enter the values and then post back, querying the database then. Quote Posting Guidelines
barski Posted September 16, 2003 Author Posted September 16, 2003 I mean at some point textbox1.text="whatevervalue" but If I check what textbox1.text equals on the load, prerender, init events it returns "" instead of "whatevervalue" Quote
bungpeng Posted September 16, 2003 Posted September 16, 2003 In ASP.NET, Viewstate will keep value of controls and Page_Init/Load event will fire before any others, these are the elements something quite confuse to programmers. If I am not mistaken, you need to check your textbox value in Page_Init/Load events before your actual event, your value may vary between those events... Quote
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.