I am trying to use friendly url. But after redirecting to child page , again it is going to master page. so it keeps on recycling.
I am not able to guess what s happening.
I installed frienly url package. then this is the routeconfig.cs
public static class RouteConfig
{
public static void RegisterRoutes(RouteCollection routes)
{
var settings = new FriendlyUrlSettings();
settings.AutoRedirectMode = RedirectMode.Permanent;
routes.EnableFriendlyUrls(settings);
}
}
2. Global.asax.cs
protected void Application_Start(object sender, EventArgs e)
{
RouteConfig.RegisterRoutes(RouteTable.Routes);
}
3.Master page
4.Home Page.
5.sportschildpage.
i put
ispostpack
condition in all form and i made it
home.aspx
as a startup page. so it displays nicely without aspx.
everybody knows debugger cycling. i am telling what is happening for my case.
when i run the project, debugger went to application_start and called the
RegisterRoutes
function then it went to
page load of home.aspx.cs
then it went page load of master page. then home page displayed without aspx. i have a button in home aspx. in click event i redirected to sportschildpage. so, now when i click button, debugger calls page load . i put ispostpack condittion true and false, so debugger went to master page then it goes to click event. once click event called , it redirects to sporstchildpage.
But , Here is the problem after completion of pageload of sporstchild page, it is not rendering to browser. again it calls master page load and ispostpack gets false. so again debugger calls sporstchild page. like wise roundtrip is happening again and again more than 3 times.
where i am doing mistake. help needed.