Click here to Skip to main content
16,014,467 members
Please Sign up or sign in to vote.
1.00/5 (1 vote)
See more: (untagged)
Hi,

i want to show last part of url of application as '/Public/Main.aspx' after login for whole life of user till he logout, whether he clicks on any page from menu, but it is not not working. I have tried so many things, like in Global.asax in Application_BeginRequest event

VB
Dim URL_path As String = HttpContext.Current.Request.Url.ToString()
If (Not URL_path.Contains("/Public/Main.aspx") And Not URL_path.Contains("/Public/Login.aspx") ) Then
            Context.RewritePath("/Public/Main.aspx")
End If


It does for one page only then when i click on menu item it started showing error, or sometimes started showing 2 windows in application, or started saying page not found.

Please help.
Posted
Updated 7-Jul-15 0:45am
v2
Comments
virusstorm 7-Jul-15 7:46am    
Are you trying to use URL rewrite to simulate a single page application?
deepika_s 9-Jul-15 0:44am    
No, Its a complete asp.net web application with around more than 100 pages.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900