Billy Ma
asked on
ASP.NET C# Response.Redirect
I don't know why Response.Redirect does not work if I put it in a class?
public static void Check_Variable()
{
if (HttpContext.Current.Sessi on["select ed_year"] == null)
{
Response.Redirect("Option. aspx");
}
selected_risk_rating_year = int.Parse(Session["selecte d_risk_rat ing_year"] .ToString( ));
}
any one can help?
public static void Check_Variable()
{
if (HttpContext.Current.Sessi
{
Response.Redirect("Option.
}
selected_risk_rating_year = int.Parse(Session["selecte
}
any one can help?
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
because I put it on the site.master
I however, the Option page also have the site.master
right?
So I have to stop the redirect if it is on the Option page.
I however, the Option page also have the site.master
right?
So I have to stop the redirect if it is on the Option page.
ASKER
but the sPath always return false....why?
public static void CheckVariable()
{
if (HttpContext.Current.Sessi
{
string sPath = System.Web.HttpContext.Cur
if (sPath == "/Option.aspx")
{
HttpContext.Current.Respon
}
}
selected_year = int.Parse(HttpContext.Curr
}