How to clear the query string after I have already got the values I want?

-1

I'm using ASP.NET C #, and I wanted to clear the query string so that it does not look at the user, for example " link " ..... I get this name and use it in my code when on pageLoad, but I wish that after I got his name, it would not be visible to the user.     

asked by anonymous 09.09.2015 / 21:03

1 answer

0

Hello,

use following JavaScript code

//pega a url atual, remove o query string e altera a url
var pageObj = {"html":"","pageTitle":""};
window.history.pushState(pageObj ,"", window.location.href.split('?')[0]);

the url is the last parameter, and I set it to

window.location.href.split('?')[0]

The object passed in the first parameter can have the following items

run this after saving (or add to output after picking up data in C #)

Font

    
09.09.2015 / 21:30