I want to redirect to Home.aspx page but I am getting this error message:"System.Web.HttpException: Response is not available in this context" in the line of Response.Redirect("Home.aspx"); Any idea on solving this?
if ((strbuffer[11].ToString() == strCard1[11]))
{
UserID = "0000";
Send_Beep();
System.Diagnostics.Debug.WriteLine(("UserId: " + UserID));
comRFID.Close();
Response.Redirect("Home.aspx");//Server.Execute("Home.aspx");//HttpContext.Current.Response.Redirect("Home.aspx");//Server.Transfer("Home.aspx", true);
}else
{
Response.Write("<script>alert('Card Undefined, Please Register Your Card.');</script>");
}