S
savvy
I am using the code below to check whether a member is valid or not ,
and if he is then allowing him to certain parts of the site. My problem
is when a person logs on by entering his user ID and pwd he'll always
be directed to the index.aspx page.if he clicks APPLY JOB button it
should first ask for login details and then i want him to get directed
to the respective page (applyjob.aspx) not the index.aspx. I cant do
Response.Redirect then it will directly all my pages to the
applyjob.aspx. I hope i made some sense till now. Can anyone help me in
this pleas
Thanks in Advance
private void btnlogin_Click(object sender, System.EventArgs e)
{
bool blnAuthentication =
Authenticate(txtusername.Text,txtpassword.Text);
if(blnAuthentication)
{
FormsAuthentication.RedirectFromLoginPage(txtusername.Text,false);
Session["isMemberLoggedIn"]= true;
Response.Redirect("index.aspx");
}
else
{
Session["isMemberLoggedIn"]= false;
lblErr.Text = "Your Login was invalid. Please try again.";
txtusername.Text="";
}
}
and if he is then allowing him to certain parts of the site. My problem
is when a person logs on by entering his user ID and pwd he'll always
be directed to the index.aspx page.if he clicks APPLY JOB button it
should first ask for login details and then i want him to get directed
to the respective page (applyjob.aspx) not the index.aspx. I cant do
Response.Redirect then it will directly all my pages to the
applyjob.aspx. I hope i made some sense till now. Can anyone help me in
this pleas
Thanks in Advance
private void btnlogin_Click(object sender, System.EventArgs e)
{
bool blnAuthentication =
Authenticate(txtusername.Text,txtpassword.Text);
if(blnAuthentication)
{
FormsAuthentication.RedirectFromLoginPage(txtusername.Text,false);
Session["isMemberLoggedIn"]= true;
Response.Redirect("index.aspx");
}
else
{
Session["isMemberLoggedIn"]= false;
lblErr.Text = "Your Login was invalid. Please try again.";
txtusername.Text="";
}
}