Server Side Validation
-
Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..
-
Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..
U should 1st check if UserName exists in DB if no then return error accordingly. If UserName exists then check for the authenticity of the password for that particular user. U can write a stored proc to check for these conditions Tej Aj, http://opexsolution.com/forum/ Fan of: http://www.abtstudioz.com/
-
Hi, I have to validate the control in server side and have to find which control value is wrong. Ex: im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong).. Please help me..
Gobi.madura wrote:
im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong)..
Normally, most of the sites doesn't say whether any specific (username/ password is wrong. They show one of it wrong, might be for hiding the identity. if some hacker try to login with the credential, s/he would not come to know, what is wrong Username or Password. But if you want to implement, then you can implement as Tej suggested.
Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overhead -
Gobi.madura wrote:
im passing user name and password. if password is wrong it should find only the password is wrong, (normally it shows Username or Password is wrong)..
Normally, most of the sites doesn't say whether any specific (username/ password is wrong. They show one of it wrong, might be for hiding the identity. if some hacker try to login with the credential, s/he would not come to know, what is wrong Username or Password. But if you want to implement, then you can implement as Tej suggested.
Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overheadYa Thank you. I understood the security problem but the requirement is the following : Tej said checking username and then password, I hope it makes 2 round trip to verify the username and password. So that i created a array list and added the username and password in it And concadinated those two values seperated by comma and stored in a string vriable and passed the string to the DB(For avoiding multiple round trip). It works perfectly for the username and password verfication. But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems. Please do the needful
-
Ya Thank you. I understood the security problem but the requirement is the following : Tej said checking username and then password, I hope it makes 2 round trip to verify the username and password. So that i created a array list and added the username and password in it And concadinated those two values seperated by comma and stored in a string vriable and passed the string to the DB(For avoiding multiple round trip). It works perfectly for the username and password verfication. But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems. Please do the needful
Gobi.madura wrote:
But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems.
See, you have to validate the multiple textboxes, So you have to have some mapping between the textboxes and the data in DB. I didn't get without this mapping how are you validating it( Might be I didn't get your requirement fully). Just have some data in some pair ( like tb1,tb1data) to map the textbox and data and according validate and populate.
Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overhead -
Gobi.madura wrote:
But the requirement is to validate multiple text box in server side, When i go for the same approach for this DB doesn't know Which control holds what value and while returning back am facing control mapping problems.
See, you have to validate the multiple textboxes, So you have to have some mapping between the textboxes and the data in DB. I didn't get without this mapping how are you validating it( Might be I didn't get your requirement fully). Just have some data in some pair ( like tb1,tb1data) to map the textbox and data and according validate and populate.
Cheers!! Brij My Blog:http://brijbhushan.wordpress.com
Check my latest Article :ViewState - Various ways to reduce performance overheadYa i am facing the problem in mapping the control with its value only. But do you think what am trying to do is good and will it be secure and efficeint. Because if i do server side validation it makes round trip as well as security problem as u said. I need some suggestion regarding my requirment and the approach.