开发者

How do I enable the back button on ajax calls with long options in the .NET url?

I am trying to enable the back button on ajax calls...my solution...when an ajax call is made, create a guid, insert into the database the variables and insert the guid into the URL...when the user hits the back button, call the database with that guid to get the variables and set the page up....so back button would work normally in ajax.

As you know, javascript paging kills the back button. But it also kills the ability to link to a given page. To avoid page reloading, but maintain the back button, you are going to need to use # in the URL. Then you will be able to use the back button (and link directly to a page), but you are going to need to parse the URL when the page loads, moving the page to the co开发者_运维技巧rrect one.

I am using a scriptmanager tag with EnableHistory set to true, so the built in .net 3.5 ajax back button support would be nice!

I would prefer to use the built in .net ajax back button support; you add a history point and it adds the crap to the URL...plus with jquery, I would still have the URL character limits of 260. This limit of 260 is really the root problem....

I don't want to use the database for this, but I can't find a way to put > 260 chars in the query string (could be a search for something, plus a page number, plus a price filter, plus a manufacturer filter, etc, etc....)


I ended up solving this by creating a guid and storing the reference in the database


Have you thought of creating implementing your own version of decision points based on javascript dictionary, this would give you the flexibility u want with the url and not have database overhead calls.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜