Redirect fired when drop downlist change event occurs

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?
 
J

Jeffrey Palermo [MCP]

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
 
G

Guest

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
 
G

Guest

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
 
G

Guest

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
 
J

Jeffrey Palermo [MCP]

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
 
G

Guest

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.
 

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

Members online

No members online now.

Forum statistics

Threads
473,755
Messages
2,569,536
Members
45,012
Latest member
RoxanneDzm

Latest Threads

Top