validationSummary controls

Discussion in 'ASP .Net' started by NuB, Dec 20, 2005.

  1. NuB

    NuB Guest

    How can i hide a grid and textboxes if the page is not valid?
     
    NuB, Dec 20, 2005
    #1
    1. Advertising

  2. Put ur Grid and textboxes in panel and hide the pane on page_load event.

    SC

    "NuB" wrote:

    > How can i hide a grid and textboxes if the page is not valid?
    >
    >
    >
    >
     
    =?Utf-8?B?U0M=?=, Dec 20, 2005
    #2
    1. Advertising

  3. NuB

    NuB Guest

    I tried that and the grid would still show if Page.isValid = false

    I had in my page load

    if (page.isvalid = true)
    {
    panelgrid.visible = true;
    }
    else if (Page.IsValid = false)
    {
    panelgrid.visible = false;
    }

    am i missing something or is this wrong?


    "SC" <> wrote in message
    news:...
    > Put ur Grid and textboxes in panel and hide the pane on page_load event.
    >
    > SC
    >
    > "NuB" wrote:
    >
    >> How can i hide a grid and textboxes if the page is not valid?
    >>
    >>
    >>
    >>
     
    NuB, Dec 20, 2005
    #3
  4. NuB

    Scott Allen Guest

    On Tue, 20 Dec 2005 14:47:33 -0500, "NuB" <> wrote:

    >I had in my page load
    >
    >if (page.isvalid = true)


    Aren't you getting any compiler warnings?

    Page.IsValid = true sets IsValid to true.

    Page.IsValid == true compares IsValid to true and returns true or
    false.

    --
    Scott
    http://www.OdeToCode.com/blogs/scott/
     
    Scott Allen, Dec 20, 2005
    #4
  5. NuB

    NuB Guest

    no, i can compile and run it but my grid will not be set to visible=false if
    the page fails validation
    "Scott Allen" <> wrote in message
    news:...
    > On Tue, 20 Dec 2005 14:47:33 -0500, "NuB" <> wrote:
    >
    >>I had in my page load
    >>
    >>if (page.isvalid = true)

    >
    > Aren't you getting any compiler warnings?
    >
    > Page.IsValid = true sets IsValid to true.
    >
    > Page.IsValid == true compares IsValid to true and returns true or
    > false.
    >
    > --
    > Scott
    > http://www.OdeToCode.com/blogs/scott/
     
    NuB, Dec 20, 2005
    #5
    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. John Mabbott

    ValidationSummary Disappearing Act!

    John Mabbott, Jun 27, 2003, in forum: ASP .Net
    Replies:
    0
    Views:
    477
    John Mabbott
    Jun 27, 2003
  2. Gandalf
    Replies:
    0
    Views:
    502
    Gandalf
    Aug 10, 2003
  3. Ken Varn

    Multiple ValidationSummary controls.

    Ken Varn, Mar 29, 2005, in forum: ASP .Net
    Replies:
    1
    Views:
    5,565
    Peter Blum
    Mar 30, 2005
  4. MattB
    Replies:
    0
    Views:
    523
    MattB
    Feb 3, 2006
  5. Phl
    Replies:
    0
    Views:
    124
Loading...

Share This Page