dont worry, Im not American either. English.
Ok, so you want to send a boolean accross several pages.
so:
//on login_page.aspx
bool successfulloging = false;
//then write whatever code to test login details and set this boolean
appropriately.
//then put into session variable
Session[s_successfullogin] = successfullogin;
//on the other page you need to take the boolean out of the session
variable
boolean successfullogin = (bool) Session["s_successfullogin"];
if(successfullogin != true)
{
Response.Redirect("login_page.aspx");
}
you can use forms authentication in .net 2.0 also. This is very
simple.
mi********@gmail.com wrote:
i tested your code
this syntax didn't work in asp.net 2 with c# language
i think it works in asp
should i type any namespace ?
ofcourse i want to create a page for login to a another page
in first page username and password are checked if were correct go to
second page
but i don't want to a user type the name of second page and view the
page
i want to send a form parameter from first page to second page that
only let to view page if
that variable be true
i hope you understand :)
i amnot american and i can't speak and type in american well
thanks