Getting error while redirecting 'Response is not available in this context'

后端 未结 1 977
猫巷女王i
猫巷女王i 2020-12-17 16:14

I am using following code to redirect user to a page.

Session[\"USERDATA\"] = user;
if (roleName.Equals(\"Zerker\", StringComparison.CurrentCulture))
   Resp         


        
相关标签:
1条回答
  • 2020-12-17 16:49

    I think you are using response object in your own class. This object will not be available there.

    Try using

    HttpContext.Current.Response.Redirect("~/Account/Dashboard.aspx");
    
    0 讨论(0)
提交回复
热议问题