Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / February 2006

Tip: Looking for answers? Try searching our database.

Back Button Problems

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
TCB - 17 Feb 2006 18:22 GMT
I have a problem...I have a classified adds web app. This if what is
happening:

1. The user enters the site
2. The user checks one of the adds. This web page has a user control that
load similar adds to the one the user has currently selected, in this same
user control there is a form so the user can contact the seller. So when the
page loads, all the contact information of the seller is loaded into this
user control, exept the email address that is loaded into a var so no email
"fhishers" can grab the address.
3. The user goes and checks one of the similar adds shown on the similar
adds list in that user control.
4. The user decides to go back and contact the seller from the first add he
saw, but he only hits the back button on the browser, so no data reloads on
the previous page and the variable with the sellers email address still has
the value from the second add, not the firs one (wich he intends to contact
the seller) so the contact message goes to another person.

PLEASE HELP!

TIA!
Joerg Jooss - 17 Feb 2006 19:14 GMT
Thus wrote TCB,

> I have a problem...I have a classified adds web app. This if what is
> happening:
[quoted text clipped - 24 lines]
> the seller) so the contact message goes to another person.
> PLEASE HELP!

You could try to make your pages non-cacheable, but that doesn't work across
all browsers:

Response.Cache.SetCacheability(HttpCacheability.NoCache);

A safer approach is not to cache the E-Mail address at all, but retrieve
it only when it's required.

Cheers,
Signature

Joerg Jooss
news-reply@joergjooss.de

blackstaronline.net - 17 Feb 2006 20:05 GMT
I'm with Joerg on this one. That "should" (theres always exceptions)
make the page load completely again after the uesr hits the back
button. This should auto-fill your information for the correct seller.
Also, Joerg is correct with the email address. If its not something
your displaying on the screen then don't pull it until you need it.

Jeremy Reid
http://blackstaronline.net/hgtit
TCB - 17 Feb 2006 20:36 GMT
Thank you both! =)

I found that if I save the Email address in the viewstate of the usercontrol
this seems to work. But if someone thinks that that is unsafe of could not
work sometimes, please let me know.

Thanks again.

> I'm with Joerg on this one. That "should" (theres always exceptions)
> make the page load completely again after the uesr hits the back
[quoted text clipped - 4 lines]
> Jeremy Reid
> http://blackstaronline.net/hgtit

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2009 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.