开发者

How to show only the base url of the web-application on address bar of browser even if we go to any page?

We want to show only the base url (www.myapplication.com) of the web application even if the use browse to any other webpage in the appli开发者_如何学Ccation. Please guide.

Thanks in advance.


Have you tried using Server.Transfer("~/MyHiddenPage.aspx")?

By doing a Server.Transfer, you can redirect the user to the new page without affecting the Address Bar.


You can do it using an IFrame only as your index page inside which all your application pages open. This way on the index you will have an IFrame showing your default page and links in them which in turn open inside the IFrame without affecting the url in the browser address bar.

Example for the above using framesets:

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Frameset//EN" "http://www.w3.org/TR/html4/frameset.dtd">
<html>
<head><title>Test</title>
</head>
<frameset cols="100%">
<frame src="http://www.geektantra.com">
</frameset>
</html>

Now whenever you click on any link inside the page the address bar url remains the same but he content changes. It is a pure HTML methodology and agnostic of any backend scripting language. So instead of http://www.geektantra.com you can put you defaul.aspx.

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜