Not Doing Postback

Discussion in 'ASP .Net' started by blue, Jan 26, 2004.

  1. blue

    blue Guest

    When the user clicks a button on my form, I disable the page
    (document.body.disabled = true;) so they can't submit the form multiple
    times before the postback occurs. When I do this, it doesn't post back at
    all. I also tried just disabling the button itself (btn.disabled = true;)
    and that also causes it to not post back.

    Is there a way to disable the page and have a postback?

    Thanks,

    blue
    blue, Jan 26, 2004
    #1
    1. Advertising

  2. The mechanism of postback is driven by client side script. If you disable
    the page, postback will never occur, unless you create your own handler (ie,
    check and see if it is x dropdown, button, et al) and submit.

    I would guess you need to rethink the problem rather than disable the page.
    It sounds like validation, or similar, is the real issue. Think through the
    use case (you do have use cases?) step by step and figure out what actions
    can and cannot happen at each step. You can then build the page to fit these
    conditions.

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

    **********************************************************************
    Think Outside the Box!
    **********************************************************************
    "blue" <> wrote in message
    news:%...
    > When the user clicks a button on my form, I disable the page
    > (document.body.disabled = true;) so they can't submit the form multiple
    > times before the postback occurs. When I do this, it doesn't post back at
    > all. I also tried just disabling the button itself (btn.disabled =

    true;)
    > and that also causes it to not post back.
    >
    > Is there a way to disable the page and have a postback?
    >
    > Thanks,
    >
    > blue
    >
    >
    Cowboy \(Gregory A. Beamer\), Jan 26, 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. Scott Lyon
    Replies:
    5
    Views:
    7,007
    L. L.
    Oct 31, 2003
  2. hphan1229

    Page not found when doing postback

    hphan1229, Aug 1, 2007, in forum: .NET
    Replies:
    1
    Views:
    394
    hphan1229
    Aug 2, 2007
  3. TomK
    Replies:
    1
    Views:
    1,946
    Manish
    Feb 6, 2008
  4. pradeep

    url in cell.innerhtml not doing a postback

    pradeep, Feb 28, 2005, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    114
    Wilco Bauwer
    Feb 28, 2005
  5. TomK
    Replies:
    2
    Views:
    250
Loading...

Share This Page