日期:2014-05-18  浏览次数:20501 次

有关Global.asax?请大家帮忙!
protected   void   Application_BeginRequest(Object   sender,   EventArgs   e)
{
a=setcsService.GetCustomerStateByCustID( "10001 ");
if(a==1)
{
//Response.Redirect( "LockCustomer.aspx ");//如果为 "1 "表明客户是锁定的.
Context.Response.Redirect( "LockCustomer.aspx ");
return;
}
                                    }
想让它条件成立时转到LockCustomer.aspx,为什么转不过去呢?


------解决方案--------------------
a=setcsService.GetCustomerStateByCustID( "10001 ");
if(a==1)
{
//Response.Redirect( "LockCustomer.aspx ");//如果为 "1 "表明客户是锁定的.
Context.Response.Redirect( "LockCustomer.aspx ");
return;
}
else
{
Context.Response.Redirect( "LockCustomer.aspx ");
}
------解决方案--------------------
前面孟老大刚回过类似的帖子

你这件事在这里做就不合适..
------解决方案--------------------
看错了
------解决方案--------------------
a=setcsService.GetCustomerStateByCustID( "10001 ");
//a是整型?
if(a.ToString()== "1 ")
{

HttpContext.Current.RewritePath( "LockCustomer.aspx ");
return;
}