Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Multiple Panels

Status
Not open for further replies.

mrathi

Technical User
Oct 27, 2003
115
0
0
US
Hi, I truly appreciate this forum. Everyone is so helpful.

I have created four panels and each panel has a button to save and proceed to the next panel. The button will do the validations and save it to the database. I have also provided linkbuttons on the top, so that the user will not have to go one panel after another and basically he can jump from any panel to any other panel. I have omitted the validations on clicking link buttons. All it does is takes
the user from panel to panel.

Suppose, the user jumps directly to the last panel where the final submit button is located. If he clicks the submit button, the button validates only for that particular panel. I want the final button to make sure that all the four panels are valid. How can I implement this?

Thanks for your help.

 
Hi mrathi,

Did you not get this sorted in thread855-983709? We talked about customvalidator controls and i gave you a link on how to use them.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
I wanted to know if there was a way just to check if the panel is validate? I mean I have a bunch of required field, comparison validators on each panel. And these validators have been just dragged and dropped from the toolbox in VS.Net

If I had to do custom validation, then I guess I will have to write the validation for each of those, am I right?

Thanks again for your reply. I appreciate it.
 
Yes you are correct - you would have to write your own validation. The only other way of checking if a page is valid is using Page.IsValid and since some of the validation controls won't be valid (since they are just on another panel) it will return False.

Personally I would use the CustomValidator, and write a validator for each Panel as each Panel can then be validated at any time.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
If the panels are hidden, will the page.isvalid check for the controls on hidden panels as well. Currently, if I do page.isvalid, it just checks for the validation on the panel that I am on, and not the hidden panels.

Thanks
 
If you hide a Panel, no HTML is rendered to the page for that panel so effectively it is like deleting it from the page. As it doesn't exist, it means that it's validation controls don't exist and therefore if you current panel is valid, the page will be valid.

----------------------------------------------------------------------

Need help finding an answer?

Try the search facilty ( or read FAQ222-2244 on how to get better results.
 
Hi, I am still struggling with this. This is what I understand. Please tell me if I am wrong.

Instead of using the required field validators, I should use custom validators on each of my textbox. Then in the custom validator function, I should code to check if the length of the textbox is greater than zero. Then on the final submit button I should call each of these custom validator functions to check if the page is valid.

Am I in the right direction? This is tooo hard

Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top