Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Refreshing the form
Message
General information
Forum:
ASP.NET
Category:
Web forms
Miscellaneous
Thread ID:
00904563
Message ID:
00905584
Views:
21
>>I have a VB.Net Web Form on which I collect informtion that allows me to modify the WHERE clause of my Select statement.
>>When I click the OK button confirming my new WHERE clause, I'd like to have the record currently displayed on the screen to be replaced by the first record matching the new WHERE clause.
>>
>>I also have navigation buttons on the form.
>>Currently I have to click my "FIRST" button to get the form to update with the content of the first record matching the new WHERE clause.
>>
>>I've tried calling the "FIRST" button in the code after my WHERE clause session variable is updated, but that's not working. What do I need to do to get it to work?
>>
>>TIA,
>>Rick
>>-------------------------------------------
>Is the autopostback property set on your OK button?
>--------------------------------------------
Joe,
I've checked the property list of the button and don't see autopostback listed as a property.
Also, on my FIND panel, where I collect the information to modify the Select statement, I have a DropDownList of states. If I choose "FL", then click OK, the WHERE clause correctly becomes
State = 'FL'
and I see this in the SESSION variable list of my TRACE when to page reloads

On the chance that it hadn't been sent to session when I thought it had, I added a bunch of trace statements.
What I found was that the session variable was set after the postback page_load... not before!

So, after seeing that, I added a call to the page_load event as my last line of the OK click event. Now I'm getting the results I wanted...

I thought the postback happened AFTER the last line of my OK button click event, but it appears it happens before the first line of my button click event.... (Can anyone confirm for me when the postback actually happens?)

Thanks,
Rick
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform