Re: RequiredFieldValidators and user control required fields?

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



Dave,

You'll have to write a bit of javascript yourself because of the way your
are hiding/showing your tabs. If you'd used panels so that the various
unseen sections weren't actually there in code on the page then the required
field validators would work out of the box for you. But using panels would
require post backs each time one is switched to.

The required field validators all have an enabled property when created
client side. You should be able to set each control's enabled value to true
or false based on your tab change.

Regards,

Justin




"Dave" <Dave@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:ACE3F90D-B60B-4B10-B51E-DB4FE497E74C@xxxxxxxxxxxxxxxx
Hi,
I'm using .NET 1.1 and wondering if I can use RequiredFieldValidators with
required fields inside user controls.

The page is a type of tabbed panel layout with the divs show/hidden using
javascript. Depending on which tab panel is visible upon the submit, I
want
to execute the appropriate javascript validation.

When I submit the form, is there a way to conditionally check or fire the
requiredfieldvalidators? Do you place the regfieldvalidator on the .aspx
and
reference the control to validate as Control:FormField?

I can write the js to validate manually but was wondering if there is a
slick way of doing this. Thanks.


.



Relevant Pages

  • Re: Panels !!!!!!
    ... Thay are changed by checkboxes and combobox. ... Now look at the panels Bookmarks and Pages in Abobe Acrobact Reader. ... NOT this checkboxes that act like raido buttons on the VIEW ribbon tab. ... LINKS for the 2007 Office System ...
    (microsoft.public.word.docmanagement)
  • swing widgets: Whos got the focus?
    ... I am using panels with etched and titled borders to group my bits and ... set of widgets I am working with ... And it seems I cannot use tab to put the focus to the next widget. ...
    (comp.lang.java.help)
  • Re: Stacked panel controls
    ... Setting the Tabcontrols properties as I suggested will result in a ... If you insist on using Panels ... > I don't want to use a tab control. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Using Tab Control
    ... Tabpages are basicly just Panels, so I would suggest you use a collection of ... Mick Doherty ... > In my application, I'd like to have a tab control with say, 5 tabs. ...
    (microsoft.public.dotnet.framework.windowsforms)
  • Re: Page validation with multiple panels
    ... my panels to be visible and then call Page.Validate. ... Jonas ... > controls than would otherwise fit onto one page. ... > validators, and if the page is valid, it is sent to the database in one ...
    (microsoft.public.dotnet.framework.aspnet.webcontrols)