Mortarello
asked on
viewState on Asp.net
Hello guys,
I'm trying to do one simple validation on my login page, When user enter with login and password wrong my URL on browser show my viewstate . Is this correct ?
I'm doing a simple validation on codebehind .
if (pwd.Equals("321") && login.Equals("michel"))
{
Response.Redirect(goTo);
}
This only hapens if password or login is wrong, if he type right details the application do not show the viewstat on the url browser.
http://localhost:49326/Pages/login.aspx?__VIEWSTATE=%2FwEPDwULLTEyOTAxODc5MjdkZEPigUAStfitSrghbglrJ10NMyIrlSSZJLRGVC%2FE9BTI&__EVENTVALIDATION=%2FwEWBALApPi4AwLEhISACwKd%2B7q4BwKM54rGBlgX8nAYTnzXlfpiDqzhurqL3vEDdUp7adD%2BHf%2B9yUPl&txtname=michel&txtpwd=123&Button1=Confirm
I'm trying to do one simple validation on my login page, When user enter with login and password wrong my URL on browser show my viewstate . Is this correct ?
I'm doing a simple validation on codebehind .
if (pwd.Equals("321") && login.Equals("michel"))
{
Response.Redirect(goTo);
}
This only hapens if password or login is wrong, if he type right details the application do not show the viewstat on the url browser.
http://localhost:49326/Pages/login.aspx?__VIEWSTATE=%2FwEPDwULLTEyOTAxODc5MjdkZEPigUAStfitSrghbglrJ10NMyIrlSSZJLRGVC%2FE9BTI&__EVENTVALIDATION=%2FwEWBALApPi4AwLEhISACwKd%2B7q4BwKM54rGBlgX8nAYTnzXlfpiDqzhurqL3vEDdUp7adD%2BHf%2B9yUPl&txtname=michel&txtpwd=123&Button1=Confirm
What is goTo? Evidently the ViewState is part of that.
ASKER
Hi paukmacd,
This is my validation on my code behind.
var pwd = txtpwd.Text;
var login = txtname.Text;
string goTo = "clientform.aspx";
if (pwd.Equals("321") && login.Equals("michel"))
{
Response.Redirect(goTo);
}
I just would like to know if it is normal or not..Because when user type the correct login and passord the viewState is not shown on url browser.
Tks
This is my validation on my code behind.
var pwd = txtpwd.Text;
var login = txtname.Text;
string goTo = "clientform.aspx";
if (pwd.Equals("321") && login.Equals("michel"))
{
Response.Redirect(goTo);
}
I just would like to know if it is normal or not..Because when user type the correct login and passord the viewState is not shown on url browser.
Tks
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks Guys..
I did using else as Ramkisan said works..And i did using Post as Guru_sami said works too.
:)
I did using else as Ramkisan said works..And i did using Post as Guru_sami said works too.
:)