Using Summary Validation control with server Custom validation

Discussion in 'ASP .Net' started by =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004.

  1. I setup some standard Required Field Validation controls and one Custom
    validation control on an ASP.NET page (within a user control) to validate
    text entry. I also setup a Summary Control to post all the messages to a
    message box (ShowMessageBox=true). The required field validation error
    messages show up in the summary just fine but I can't get the custom
    validation message to show up if invalid.

    So far I have the summary control showing the required field errors and the
    custom validation message shows inline. In order to get that to work, I had
    to add code to my button control to not redirect to other page if
    page.isvalid = false. Is there anyway to get it to show up on the message
    box? Does it have anything to do with the fact that the messagebox is client
    side and the custom validation control is doing server side validation?

    Thanks,
    Barbara Alderton
     
    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004
    #1
    1. Advertising

  2. =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=

    Peter Blum Guest

    The alert box shown is a client-side feature that appears prior to posting
    back. Your customvalidator most likely does not have any client-side code.
    So it cannot contribute to the client-side message box. If you can, write
    client-side code for your customvalidator. Otherwise, you will have to live
    with this design.

    --- Peter Blum
    www.PeterBlum.com
    Email:
    Creator of "Professional Validation And More" at
    http://www.peterblum.com/vam/home.aspx

    "Barbara Alderton" <> wrote in
    message news:...
    >I setup some standard Required Field Validation controls and one Custom
    > validation control on an ASP.NET page (within a user control) to validate
    > text entry. I also setup a Summary Control to post all the messages to a
    > message box (ShowMessageBox=true). The required field validation error
    > messages show up in the summary just fine but I can't get the custom
    > validation message to show up if invalid.
    >
    > So far I have the summary control showing the required field errors and
    > the
    > custom validation message shows inline. In order to get that to work, I
    > had
    > to add code to my button control to not redirect to other page if
    > page.isvalid = false. Is there anyway to get it to show up on the message
    > box? Does it have anything to do with the fact that the messagebox is
    > client
    > side and the custom validation control is doing server side validation?
    >
    > Thanks,
    > Barbara Alderton
     
    Peter Blum, Oct 15, 2004
    #2
    1. Advertising

  3. Thanks for your quick response. I am using server side code because it needs
    to validate the entry against Active Directory on the server. This can't be
    done from client side as far as I know.

    I have read numerous articles on validation controls and it is never
    mentioned that the message box cannot be used for custom validation controls
    that don't use client-side code but I did suspect that was the case since
    message box is a client-side feature. I guess I'll have to live with the
    design I'm using know.

    Thanks again,
    Barbara Alderton

    "Peter Blum" wrote:

    > The alert box shown is a client-side feature that appears prior to posting
    > back. Your customvalidator most likely does not have any client-side code.
    > So it cannot contribute to the client-side message box. If you can, write
    > client-side code for your customvalidator. Otherwise, you will have to live
    > with this design.
    >
    > --- Peter Blum
    > www.PeterBlum.com
    > Email:
    > Creator of "Professional Validation And More" at
    > http://www.peterblum.com/vam/home.aspx
    >
    > "Barbara Alderton" <> wrote in
    > message news:...
    > >I setup some standard Required Field Validation controls and one Custom
    > > validation control on an ASP.NET page (within a user control) to validate
    > > text entry. I also setup a Summary Control to post all the messages to a
    > > message box (ShowMessageBox=true). The required field validation error
    > > messages show up in the summary just fine but I can't get the custom
    > > validation message to show up if invalid.
    > >
    > > So far I have the summary control showing the required field errors and
    > > the
    > > custom validation message shows inline. In order to get that to work, I
    > > had
    > > to add code to my button control to not redirect to other page if
    > > page.isvalid = false. Is there anyway to get it to show up on the message
    > > box? Does it have anything to do with the fact that the messagebox is
    > > client
    > > side and the custom validation control is doing server side validation?
    > >
    > > Thanks,
    > > Barbara Alderton

    >
    >
    >
     
    =?Utf-8?B?QmFyYmFyYSBBbGRlcnRvbg==?=, Oct 15, 2004
    #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. Colin Mackay
    Replies:
    0
    Views:
    2,703
    Colin Mackay
    Jun 25, 2003
  2. Lucas Tam
    Replies:
    2
    Views:
    1,127
    Lucas Tam
    Feb 26, 2004
  3. kpg
    Replies:
    4
    Views:
    621
  4. iHavAQuestion
    Replies:
    0
    Views:
    593
    iHavAQuestion
    Apr 28, 2008
  5. Matt Sokol
    Replies:
    2
    Views:
    409
    Theo Tillotson
    Aug 7, 2003
Loading...

Share This Page