Redirect fired when drop downlist change event occurs

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Hi all,

I have a quick question...I believe. On my web page, call it page A, I
have a drop downlist with runat server enabled. When the drop downlist
change event occurs it repopulates a table depending on the value selected on
page A. After I redirect page A to some other page, call it page B, and use
the IE Back button to change my selection on the page A the page is forwarded
to page B without rebuilding the table on page A and allowing me to redirect
my request. My question is what am I doing wrong? Is there a setting on web
page A that I should know about to prevent this?
 
Markus,
This is expected behavior. When you click back, you reexecute the
previous request, and that request did the redirecting. You'll have to use
another method if you want to be able to go back and change your selection.

Instead of doing a redirect, you can either display the correct content with
a user control on Page A, or you can put the selection in Page.Items
collection and do a Server.Transfer to Page B.

Best regards,
Jeffrey Palermo
 
Thanks...I'll give it a try.

Jeffrey Palermo said:
Markus,
This is expected behavior. When you click back, you reexecute the
previous request, and that request did the redirecting. You'll have to use
another method if you want to be able to go back and change your selection.

Instead of doing a redirect, you can either display the correct content with
a user control on Page A, or you can put the selection in Page.Items
collection and do a Server.Transfer to Page B.

Best regards,
Jeffrey Palermo
 
You mean to use HttpContext right?

Markus

Jeffrey Palermo said:
Markus,
This is expected behavior. When you click back, you reexecute the
previous request, and that request did the redirecting. You'll have to use
another method if you want to be able to go back and change your selection.

Instead of doing a redirect, you can either display the correct content with
a user control on Page A, or you can put the selection in Page.Items
collection and do a Server.Transfer to Page B.

Best regards,
Jeffrey Palermo
 
Is there a website that covers this particular topic? I've been trying to
look up this information at the local Borders(s) but can't find anything. I
know it's common knowledge but I don't remember running into this in ASP.
The thingy that I'm running into know is page history. If I create a back
buttion and use the Referring page to go back...I can only go back so
far.Everytime I post to a page I save the referring url and us this to do a
back like action. Actually one page deep. What If I wanted to back all the
way out of the application using the my back button or the IE Back buttion?

Last question...I hope.

Markus McGee
 
Markus,
Google is your best friend. Search Google and groups.google.com
(newsgroups).
I would recommend not implementing a custom back button because it becomes
very cumbersome. Code your pages so that the browsers back button continues
to function. This might take a little effort, but it will result in a
better experience for your users.

Best regards,
Jeffrey Palermo
 
Wow...the Google new group has alot of answers and suggestions. I didn't
know they existed. The solution to my problem was to change the " HTML
select " into an "ASP.NET DropDownList". From what I can tell the back
button problem has gone away. Amazing. No further questions.

Markus McGee.
 
Back
Top