ValidatonSummary control not working on an autopostback textbox

Discussion in 'ASP .Net' started by Neo, Jun 23, 2004.

  1. Neo

    Neo Guest

    I put a textbox on the page.The textbox only accepts integer value. I also
    added a comparevalidator control to check the data entered in that textbox
    and a validationsummary control on the page. The comparevalidator worked
    find and showed the error message.But page still postback to server.So it
    seemed that validationsummary control didn't work.

    are there any points to resolve this problem?

    Thanks
    Neo, Jun 23, 2004
    #1
    1. Advertising

  2. Neo

    avnrao Guest

    its true that autopostback on doesnt stop.
    add this code in code behind for the textbox that has autopostback.

    TextBox1.Attributes.Add("onchange","Page_ClientValidate();if(Page_BlockSubmit)
    return false;");
    Av.
    "Neo" <> wrote in message
    news:%...
    >I put a textbox on the page.The textbox only accepts integer value. I also
    > added a comparevalidator control to check the data entered in that textbox
    > and a validationsummary control on the page. The comparevalidator worked
    > find and showed the error message.But page still postback to server.So it
    > seemed that validationsummary control didn't work.
    >
    > are there any points to resolve this problem?
    >
    > Thanks
    >
    >
    avnrao, Jun 24, 2004
    #2
    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. Ben Fidge
    Replies:
    2
    Views:
    3,543
    Ben Fidge
    Jan 30, 2004
  2. Ron

    Autopostback not working

    Ron, Aug 25, 2004, in forum: ASP .Net
    Replies:
    7
    Views:
    3,897
    Juan Romero
    Aug 26, 2004
  3. =?Utf-8?B?c3Jp?=
    Replies:
    5
    Views:
    4,561
    =?Utf-8?B?c3Jp?=
    Aug 23, 2005
  4. =?Utf-8?B?aW5kaWdhdG9y?=

    Dropdownlist Autopostback not working

    =?Utf-8?B?aW5kaWdhdG9y?=, Mar 16, 2006, in forum: ASP .Net
    Replies:
    3
    Views:
    8,404
  5. kclark

    AutoPostback not working

    kclark, Apr 6, 2007, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    130
    Scott M.
    Apr 6, 2007
Loading...

Share This Page