javascript - How to reload page without _layout query string parameter -


page url in form

http://example.com/myapp?param1=1&otherparam=somevalue1&_layout=somevalue2&someother=something 

page contains button "reset layout" invokes javascript code:

        window.location.reload(); 

how reload page without _layout=somevalue2 parameter ? possible/reasonable use javascript ? asp.net mvc3 application. if javascript not reasonable, how call server side controller ?

jquery , bootstrap 3 used.

you can use regular expression , remove instance of _layout

  location.href=location.href.replace(/&?_layout=([^&]$|[^&]*)/i, ""); 

Comments

Popular posts from this blog

c# - Binding a comma separated list to a List<int> in asp.net web api -

how to prompt save As Box in Excel Interlop c# MVC 4 -

xslt 1.0 - How to access or retrieve mets content of an item from another item? -