Jump to content

Validatr


Siddhesh

Recommended Posts

Hi,I Have 2 Text Box And 2 Buttons(Save, Search).Now if I click on Save Button Then Requirefieldvalidator for both the Text Boxes shoould work, but when I click on Search button validator for the text fields should not work.Is it Possible??It can be done using javascript, but can we do it only with .NETI m using ASP.NET with language VB

Link to comment
Share on other sites

Hi,I Have 2 Text Box And 2 Buttons(Save, Search).Now if I click on Save Button Then Requirefieldvalidator for both the Text Boxes shoould work, but when I click on Search button validator for the text fields should not work.Is it Possible??It can be done using javascript, but can we do it only with .NETI m using ASP.NET with language VB

Hello Siddhesh, Plz see the 'cause validation' property of the 'Search' button. I think , it may false.If yes, make it true ; ur validation will fire.Cheers..Prashant..
Link to comment
Share on other sites

Hello Siddhesh,                        Plz see the 'cause validation' property of the 'Search'  button. I think , it may false.If yes, make it true ; ur validation will fire.Cheers..Prashant..

Ok, thats Fine.Now let me ask it in wide manner.I have 4 Textboxes and 2 Buttons(Save,Search).All the textboxes are having requiredfield validator.My requirement is that Only Two validators should work onclick of Save button.And other validator should work onclick of Search button.Thanks for help.
Link to comment
Share on other sites

Ok, thats Fine.Now let me ask it in wide manner.I have 4 Textboxes and 2 Buttons(Save,Search).All the textboxes are having requiredfield validator.My requirement is that Only Two validators should work onclick of Save button.And other validator should work onclick of Search button.Thanks for help.

well u can also write a custom code that can be fired as u want. this will also help ur code to look more clean and easy to understand. also take a look at custom validator for asp.net
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
×
×
  • Create New...