When i catch a invalid URL, for example: www.example.com/urlDontExists , i redirect to the Search Page, like this:
Response.Redirect("/Search");
Bu i want to send the tag "urlDontExists", to the form, to see the same result like i went to the Search page, and searched by "urlDontExists".
I know it's possible with QueryString like:
Response.Redirect("/Search?searchtag=urlDontExists");
But i 开发者_如何学Godon't want in the QueryString
This it's possible?
You can use jQuery for that.
$(document).ready(function() {
// Get the parameters and fill the search form here
var location = window.location;
// modify the querystring so that urlDoesntExist is removed from the titlebar
...
window.location.replace(modified_url);
})
Note that this is a big hack.
精彩评论