|
dev
newsgroups
|
|||||||||||||||||||||||
|
|||||||||||||||||||||||
ASP.NET Back Button SagaI'm new to ASP.NET development (as will become obvious). I developed an application which would normally have several individual .aspx pages. Instead of having several pages, I thought I would be clever and put everything on my default.aspx page. I put all the html code that would normally go on each individidual.aspx page into its own asp:table on the default.aspx page. So, instead of going to a new .aspx page when the user navigates through the Web site, I change the value of the Visible attribute to False for the asp:table they are leaving, and change the Visible attribute to True for the table they are going to. Again these asp:tables are all on me default.aspx page. This is all groovy until my user starts using the Back button. Things seem to work if the Back button is clicked once or twice, but at some point bad things start to happen. Eventually, my callback routines don't get called, so the site doesn't respond to mouse clicks. Right now, I'm avoiding the issue by "disabling" the Back button in JavaScript with: window.history.forward(1); I know this is most uncool. I was wondering if anyone had ANY ideas of how to fix the problem short of restructuring stuff to use separate ..aspx pages. ALL thoughts are welcomed. Thanks for the bandwidth! -Doug Nope, that's about all you can do, short of expiring the page content as
soon as it's delivered. Just out of curiosity, why did you decide to put all your stuff in one page? That would be a major headache to look at while in design mode and spreading the content out across several web pages isn't any trouble at all anyway. Show quote "dougloj" <doug***@msn.com> wrote in message news:1165438596.503494.174680@l12g2000cwl.googlegroups.com... > Hi. > > I'm new to ASP.NET development (as will become obvious). I developed an > application which would normally have several individual .aspx pages. > Instead of having several pages, I thought I would be clever and put > everything on my default.aspx page. I put all the html code that would > normally go on each individidual.aspx page into its own asp:table on > the default.aspx page. So, instead of going to a new .aspx page when > the user navigates through the Web site, I change the value of the > Visible attribute to False for the asp:table they are leaving, and > change the Visible attribute to True for the table they are going to. > Again these asp:tables are all on me default.aspx page. > > This is all groovy until my user starts using the Back button. Things > seem to work if the Back button is clicked once or twice, but at some > point bad things start to happen. Eventually, my callback routines > don't get called, so the site doesn't respond to mouse clicks. > > Right now, I'm avoiding the issue by "disabling" the Back button in > JavaScript with: > > window.history.forward(1); > > I know this is most uncool. I was wondering if anyone had ANY ideas of > how to fix the problem short of restructuring stuff to use separate > .aspx pages. ALL thoughts are welcomed. Thanks for the bandwidth! > > -Doug > Scott,
Thanks for your input! > Just out of curiosity, why did you decide to put Let's just say I'm a poster child for the asprin and anti-depression> all your stuff in one page? That would be a major headache to look at while > in design mode and spreading the content out across several web pages isn't > any trouble at all anyway. drug industry. Thanks again. Doug |
|||||||||||||||||||||||