ASP.NET [NEWBIE]

  • Thread starter Thread starter DaBrain
  • Start date Start date
D

DaBrain

[ASP.NET / C# / V2 Framework]

I am making the move to ASP.NET from CGI and ASP pages. I have noticed
that when building WebForms that they always use the POST method, but
this makes the page expire when leaving the page.

Example:
User changes the sort order of a page using a Drop Down list, user
clicks back button to go to the previous page/ sort order [Page has
expired]

How do I get around this? I am about to just recode it all using
QueryString but that defeats the purpose of my move to ASP.NET


Any help would be greatly appreciated.
 
User changes the sort order of a page using a Drop Down list, user
clicks back button to go to the previous page/ sort order [Page has
expired]

Er, well you're not going to be able to do much about your users hitting the
back button...
How do I get around this? I am about to just recode it all using
QueryString but that defeats the purpose of my move to ASP.NET

However, if you're looking to preserve state across PostBacks, then you need
to use the ViewState object - Google it...
 
When you populate a Dropdownlist, from a database, always surround the code
with an if/Then/Postback block
Second of all - you don't need a second page to submit to - it can all be
done on one page, VERY easily, using ASP.Net
 
Back
Top