Aidy said:
It's not that I want the URL to remain the same, I want "user friendly" page
names that hide ?ID=123456 type affairs.
Besides, putting everything on one page in panels would be a nightmare to
maintain. You'd be better off using a FRAME.
Not true, at all. And frames are an outright horrible design, but
that's another topic, altogether.
For a search page, I almost always have the input controls on a
Search.aspx page and then pass search criteria through a query string to
a SearchResults.aspx. It makes it easy to bookmark and also makes
scaling much easier. If, however, I didn't want to use a QueryString
for whatever reason, I'd just POST the values to the SearchResults.aspx
page and access them through the PreviousPage property.
For a page that adds a new record to a database and then displays a
confirmation (e.g, a sign up page), I'd most likely provide multiple
panels that I can either hide or show. The initial SignUp.aspx page,
for example, would display all the controls necessary to sign up for my
site. After a user clicks the "Submit" button, I'd hide the original
panel and display only the conformation. It simply makes sense, to me,
that the confirmation be contained within the same page. I could have
used Server.Transfer() and transfered to a page that had the
confirmation in the HTML, but that just wouldn't be as clean. Now if
you've got 10+ panels on your page and you need 1,000 lines of code to
determine which panel should be displayed, you probably should look into
splitting the panels up into multiple pages.
These are obviously two simple examples, but they scale quite nicely and
it's amazing how often I play on these two ideas with only a slight
variation.
Like I said before, I have yet to find any site that uses
Server.Transfer() that couldn't have accomplished the same concept more
cleanly using an alternative. It simply creates more problems than it
solves.