Page validation with multiple panels

Discussion in 'ASP .Net Web Controls' started by Jonas, Jan 25, 2005.

  1. Jonas

    Jonas Guest

    Hi!

    I have aspx-page where I use multiple panels to make room for more controls
    than would otherwise fit onto one page. On submit, the controls on all
    panels, visible or not, should be validated with the ASP.NET validators, and
    if the page is valid, it is sent to the database in one transaction. But it
    seems that only the controls on the visible panels gets validated.

    Is there a easy way to solve this problem?

    Brgds

    Jonas
     
    Jonas, Jan 25, 2005
    #1
    1. Advertising

  2. Jonas

    Jonas Guest

    I now got it to work if I in the serverside code for the submit button set
    my panels to be visible and then call Page.Validate. This sets Page.IsValid
    to false and I can check for this. But I want to messagebox from the
    ValidationSummary control to show up as usual, how can I trigger this
    without having to loop through the Page.Validators collection manually?

    Brgds

    Jonas

    "Jonas" <> wrote in message
    news:...
    > Hi!
    >
    > I have aspx-page where I use multiple panels to make room for more
    > controls than would otherwise fit onto one page. On submit, the controls
    > on all panels, visible or not, should be validated with the ASP.NET
    > validators, and if the page is valid, it is sent to the database in one
    > transaction. But it seems that only the controls on the visible panels
    > gets validated.
    >
    > Is there a easy way to solve this problem?
    >
    > Brgds
    >
    > Jonas
    >
     
    Jonas, Jan 26, 2005
    #2
    1. Advertising

  3. Jonas

    Jonas Guest

    By replacing my asp:panels with div-tags I got the client-side validation to
    work again.
    I got one div as a container and the two inner div's that I set
    visibility=hidden and left=1000px when I want that particul div to be
    replaced by the other. It seems to work ...

    Brgds

    Jonas

    "Jonas" <> wrote in message
    news:eEi$%...
    >I now got it to work if I in the serverside code for the submit button set
    >my panels to be visible and then call Page.Validate. This sets Page.IsValid
    >to false and I can check for this. But I want to messagebox from the
    >ValidationSummary control to show up as usual, how can I trigger this
    >without having to loop through the Page.Validators collection manually?
    >
    > Brgds
    >
    > Jonas
    >
    > "Jonas" <> wrote in message
    > news:...
    >> Hi!
    >>
    >> I have aspx-page where I use multiple panels to make room for more
    >> controls than would otherwise fit onto one page. On submit, the controls
    >> on all panels, visible or not, should be validated with the ASP.NET
    >> validators, and if the page is valid, it is sent to the database in one
    >> transaction. But it seems that only the controls on the visible panels
    >> gets validated.
    >>
    >> Is there a easy way to solve this problem?
    >>
    >> Brgds
    >>
    >> Jonas
    >>

    >
    >
     
    Jonas, Jan 26, 2005
    #3
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Chris Nunciato

    Problem with Validation Using Panels

    Chris Nunciato, Jul 1, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    329
    Chris Nunciato
    Jul 1, 2003
  2. Jonas
    Replies:
    3
    Views:
    491
    Jonas
    Jan 26, 2005
  3. flupke
    Replies:
    1
    Views:
    4,572
    enoola
    Feb 9, 2009
  4. Rob Meade

    Validation in panels - one always fires

    Rob Meade, Jan 17, 2007, in forum: ASP .Net
    Replies:
    1
    Views:
    313
    Rob Meade
    Jan 17, 2007
  5. Brybot

    Validate multiple Panels

    Brybot, Jul 11, 2007, in forum: ASP .Net
    Replies:
    4
    Views:
    473
    Brybot
    Jul 11, 2007
Loading...

Share This Page