I am in the process of coding a web application with asp.net. The users enter their credentials and these are validated against the actual email address and password for authorization. I wrote some classes for processing these data (in a seperate .cs file).
public static class Login
{
public static void LoginFirstTime(string Email, string Password)
{
//This method logs the user in for the first time after he has registered.
Response.Redirect("UserPage.aspx", true);
//After logging in, the user will be redirected to his personal page.
}
}
However I seem not to be able to access the Response.Redirect() method from inside the Login class which is in the seperate cs file. (I can access it from inside the event handlers I wrote for the aspx page.) Does anyone have an idea? Thank you in advance for helping!
first level :
using System.Web;
in next use this in your code :
HttpContext.Current.Response.Redirect("UserPage.aspx");
hope helps you
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With