I am using following code to redirect user to a page.
Session["USERDATA"] = user;
if (roleName.Equals("Zerker", StringComparison.CurrentCulture))
Response.Redirect("~/Account/Dashboard.aspx");
but this causing the error.
Response is not available in this context.
What should I do?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…