Failed validation doesn't stop page from posting back

Discussion in 'ASP .Net Web Controls' started by GoCMS, Sep 18, 2006.

  1. GoCMS

    GoCMS Guest

    Hi, guys:

    I'm developing with .net 2.0 framework. I found the validation control (
    no matter it's a required field validation, custom validation or some others
    ) doesn't really stop the page from posting back.

    What happens is even though the error message displays on the page, the
    page still posts back to the server with the invalid data. This is pretty
    annoying.

    I searched online and found some solution, such as

    do a "net_regiis.exe -ea " followed by a "net_regiis.exe -c" to delete all
    old client-side javascript from previous .net versions and install the
    current javascript.

    Also I right click the iis property pages and do a "remove application" and
    "recreate" the application. This temporarily fixes the problem. I immediately
    get a page which stops posting back. However, the moment I do another refresh
    the page, this problem comes back, the page consistently sending the invalid
    data to server.

    So.... after all this story, i wonder, is there any way to fix this issue. I
    can't really imagine doing all validation javascript by myself without using
    any validator control. Maybe someone here have the same issues and could give
    me a clue?

    Thank you very much?
     
    GoCMS, Sep 18, 2006
    #1
    1. Advertising

  2. With validation controls, you still have to check on the server side for
    validation and if the page is not valid stop the user from submitting. While
    the client side may stop some button events, it is still not enough to avoid
    other types of hack attacks.

    --
    Gregory A. Beamer
    MVP; MCP: +I, SE, SD, DBA

    *************************************************
    Think outside of the box!
    *************************************************
    "GoCMS" <> wrote in message
    news:D...
    > Hi, guys:
    >
    > I'm developing with .net 2.0 framework. I found the validation control (
    > no matter it's a required field validation, custom validation or some
    > others
    > ) doesn't really stop the page from posting back.
    >
    > What happens is even though the error message displays on the page, the
    > page still posts back to the server with the invalid data. This is pretty
    > annoying.
    >
    > I searched online and found some solution, such as
    >
    > do a "net_regiis.exe -ea " followed by a "net_regiis.exe -c" to delete all
    > old client-side javascript from previous .net versions and install the
    > current javascript.
    >
    > Also I right click the iis property pages and do a "remove application"
    > and
    > "recreate" the application. This temporarily fixes the problem. I
    > immediately
    > get a page which stops posting back. However, the moment I do another
    > refresh
    > the page, this problem comes back, the page consistently sending the
    > invalid
    > data to server.
    >
    > So.... after all this story, i wonder, is there any way to fix this issue.
    > I
    > can't really imagine doing all validation javascript by myself without
    > using
    > any validator control. Maybe someone here have the same issues and could
    > give
    > me a clue?
    >
    > Thank you very much?
    >
    >
     
    Cowboy \(Gregory A. Beamer\), Sep 19, 2006
    #2
    1. Advertising

  3. GoCMS

    GoCMS Guest

    Yeah, I understand that. There is server check in my code.
    It's just I'm not doing anything fancy. Just a couple of required field
    validator and I would expect they're providing some mechanism to stop the
    user on the client side as the first prevention.

    Since there're so many people are using validation control, they got to be
    working for them. I might miss something or there might be some walk around.

    Thanks.

    "Cowboy (Gregory A. Beamer)" wrote:

    > With validation controls, you still have to check on the server side for
    > validation and if the page is not valid stop the user from submitting. While
    > the client side may stop some button events, it is still not enough to avoid
    > other types of hack attacks.
    >
    > --
    > Gregory A. Beamer
    > MVP; MCP: +I, SE, SD, DBA
    >
    > *************************************************
    > Think outside of the box!
    > *************************************************
    > "GoCMS" <> wrote in message
    > news:D...
    > > Hi, guys:
    > >
    > > I'm developing with .net 2.0 framework. I found the validation control (
    > > no matter it's a required field validation, custom validation or some
    > > others
    > > ) doesn't really stop the page from posting back.
    > >
    > > What happens is even though the error message displays on the page, the
    > > page still posts back to the server with the invalid data. This is pretty
    > > annoying.
    > >
    > > I searched online and found some solution, such as
    > >
    > > do a "net_regiis.exe -ea " followed by a "net_regiis.exe -c" to delete all
    > > old client-side javascript from previous .net versions and install the
    > > current javascript.
    > >
    > > Also I right click the iis property pages and do a "remove application"
    > > and
    > > "recreate" the application. This temporarily fixes the problem. I
    > > immediately
    > > get a page which stops posting back. However, the moment I do another
    > > refresh
    > > the page, this problem comes back, the page consistently sending the
    > > invalid
    > > data to server.
    > >
    > > So.... after all this story, i wonder, is there any way to fix this issue.
    > > I
    > > can't really imagine doing all validation javascript by myself without
    > > using
    > > any validator control. Maybe someone here have the same issues and could
    > > give
    > > me a clue?
    > >
    > > Thank you very much?
    > >
    > >

    >
    >
    >
     
    GoCMS, Sep 19, 2006
    #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. Matt Theule

    Stop Debugging doesn't stop in ASP.NET

    Matt Theule, Jul 23, 2003, in forum: ASP .Net
    Replies:
    7
    Views:
    767
    Matt Theule
    Jul 24, 2003
  2. JezB

    Stop a button posting back

    JezB, Jun 22, 2004, in forum: ASP .Net
    Replies:
    9
    Views:
    3,411
    Eliyahu Goldin
    Jun 23, 2004
  3. Charlie
    Replies:
    1
    Views:
    2,722
    Steve C. Orr [MVP, MCSD]
    Oct 25, 2004
  4. =?Utf-8?B?Q2xlYWtv?=
    Replies:
    0
    Views:
    5,247
    =?Utf-8?B?Q2xlYWtv?=
    Nov 30, 2005
  5. sck10
    Replies:
    6
    Views:
    945
    sck10
    Sep 1, 2006
Loading...

Share This Page