In an existing C# 2010 web form application, I want to add some more server validation contols to an existing web page that does not user
validation groups. Right now the validation occurrs when the user clicks the submit button.
From what I have seen of the following link: http://msdn.microsoft.com/en-us/library/ms227424.aspx, validation occurs on whatever is the active validation control group.
Note I want to add validation groups since new the new edits show up for a few seconds and then go away. I know if I put these controls in a validation group, the fields would stay longer that a few seconds.
Thus do to what I mentioned above can you tell me the following:
1. Do I put the validationgroup names on both the validation group control and the textbox that has its value being updated? Can you explain your answer to me?
2. Since I will change a web page from having no validation groups to having two validation groups, can you tell me how I can have the two validation groups values be checked when when only one button is being clicked on?
Loading
Sukesh MarlaPosted Aug 19, 2012, 11:16 PM
1.You dont trust client side i.e, js and you need some more secure way
2. you want something to be validated on server sider
Download the sample i have used it there.
Check this is correct answer if it helped
Sie StePosted Aug 19, 2012, 10:10 PM
When does the onservervalidate code get executed?
Sukesh MarlaPosted Aug 19, 2012, 10:55 AM
http://www.c-sharpcorner.com/UploadFile/SukeshMarla/Asp-Net-validation-control/
See this link to understand the functionality of validation controls.
See if you all the textboxes and other controls need to be validate, Put same validation group to all the validation control and button.
validation group just group the things,,,Try To download the sample from URL to understand the Validation group behaviour better,
If this post helped, check this is correct answer.