Is it possible to change the URL without reloading the page in ASP.net?
是否可以在不重新加载ASP.net中的页面的情况下更改URL ?
3 个解决方案
#1
3
In versions of HTML prior to 5 (so XHTML, HTML4 etc), it is not possible to manipulate the actually whole url of the page, but you do so via the fragment identifier as @JamesGoodwin has said. This is used to great effect on Facebook, Twitter etc.
在5之前的HTML版本中(XHTML、HTML4等),不可能操作页面的整个url,但是可以通过片段标识符来操作,如@JamesGoodwin所说。这对Facebook, Twitter等都有很大的影响。
In HTML 5, an API has been designed that allows you to push history changes which reflect the actual URL of the page. A great example of this is when navigating the source tab on Github.
在HTML 5中,已经设计了一个API,允许您推送反映页面实际URL的历史更改。一个很好的例子是在Github上导航source选项卡。
Here is a rundown of the API at the Mozilla Developer Network
下面是Mozilla开发人员网络中API的一个纲要。
#2
1
The only part of the URL you can change without reloading the page is the fragment identifier.
在不重新加载页面的情况下,唯一可以更改URL的部分是片段标识符。
The fragment identifier can be changed by modifying the location.hash
property using JavaScript.
可以通过修改位置来更改片段标识符。散列属性使用JavaScript。
#3
0
i think you can do this with javascript. try this:
我认为你可以用javascript来实现。试试这个:
window.location = "http://www.google.com/"
#1
3
In versions of HTML prior to 5 (so XHTML, HTML4 etc), it is not possible to manipulate the actually whole url of the page, but you do so via the fragment identifier as @JamesGoodwin has said. This is used to great effect on Facebook, Twitter etc.
在5之前的HTML版本中(XHTML、HTML4等),不可能操作页面的整个url,但是可以通过片段标识符来操作,如@JamesGoodwin所说。这对Facebook, Twitter等都有很大的影响。
In HTML 5, an API has been designed that allows you to push history changes which reflect the actual URL of the page. A great example of this is when navigating the source tab on Github.
在HTML 5中,已经设计了一个API,允许您推送反映页面实际URL的历史更改。一个很好的例子是在Github上导航source选项卡。
Here is a rundown of the API at the Mozilla Developer Network
下面是Mozilla开发人员网络中API的一个纲要。
#2
1
The only part of the URL you can change without reloading the page is the fragment identifier.
在不重新加载页面的情况下,唯一可以更改URL的部分是片段标识符。
The fragment identifier can be changed by modifying the location.hash
property using JavaScript.
可以通过修改位置来更改片段标识符。散列属性使用JavaScript。
#3
0
i think you can do this with javascript. try this:
我认为你可以用javascript来实现。试试这个:
window.location = "http://www.google.com/"