ASP.NET [NEWBIE]

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.
 
M

Mark Rae

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...
 
D

David Wier

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top