I able to redirect the user to the index.aspx page after every
successful login, but I dont want certain pages outside the folder to
have a access to general public. So if they click that particular link
or button i want them to be re-directed to the login page and after
successful login i want to them to view the requested page.
Can i redirect the users to the login page using
Reponse.Redirec t("js/login.aspx");
in the button click event? or is there any other way?
how we can we get the url so that i can transfer to the respective
page?
I know we should use FormsAuthentica tion.SetAuthCoo kie of
FormAuthenticat ion.Getredirect Url for this purpose but i dont have any
idea how this works.
Any ideas will be greatly appreciated
At the moment i'm using this code
private void btnlogin_Click( object sender, System.EventArg s e)
{
bool blnAuthenticati on =
Authenticate(tx tusername.Text, txtpassword.Tex t);
if(blnAuthentic ation)
{
FormsAuthentica tion.RedirectFr omLoginPage(txt username.Text,f alse);
Session["isMemberLogged In"]= true;
Response.Redire ct("index.aspx" );
}
else
{
Session["isMemberLogged In"]= false;
lblErr.Text = "Your Login was invalid. Please try
again.";
}
}
successful login, but I dont want certain pages outside the folder to
have a access to general public. So if they click that particular link
or button i want them to be re-directed to the login page and after
successful login i want to them to view the requested page.
Can i redirect the users to the login page using
Reponse.Redirec t("js/login.aspx");
in the button click event? or is there any other way?
how we can we get the url so that i can transfer to the respective
page?
I know we should use FormsAuthentica tion.SetAuthCoo kie of
FormAuthenticat ion.Getredirect Url for this purpose but i dont have any
idea how this works.
Any ideas will be greatly appreciated
At the moment i'm using this code
private void btnlogin_Click( object sender, System.EventArg s e)
{
bool blnAuthenticati on =
Authenticate(tx tusername.Text, txtpassword.Tex t);
if(blnAuthentic ation)
{
FormsAuthentica tion.RedirectFr omLoginPage(txt username.Text,f alse);
Session["isMemberLogged In"]= true;
Response.Redire ct("index.aspx" );
}
else
{
Session["isMemberLogged In"]= false;
lblErr.Text = "Your Login was invalid. Please try
again.";
}
}
Comment