Disabling buttons in ASP.net 1.1

Discussion in 'ASP .Net' started by hplayer03, Jul 27, 2007.

  1. hplayer03

    hplayer03 Guest

    I'm having major issues disabling a submit button after a form has
    been filled out. Nothing I've tried so far has helped. I've put

    if(!Page.IsPostBack)
    {
    Session["JustSubmitted"]=false;
    }
    else if((bool)Session["JustSubmitted"]==true)
    {
    contiuneCode();
    }

    in the page_load

    public void btn_submit_Click(object sender, System.EventArgs e)
    {
    Session["JustSubmitted"]=true;
    btn_submit.Enabled = false;
    lbl_process.Visible = true;
    //Force Postback
    }

    i'd like to force a postback in the btn_submit_click but i can't seem
    to do that. I know its not pretty, but i'm open to other suggestions.

    Thanks.

    hplayer
    hplayer03, Jul 27, 2007
    #1
    1. Advertising

  2. hplayer03

    lee whitbeck Guest

    This should force the postback for you

    Response.AppendHeader("REFRESH", "0");
    lee whitbeck, Jul 27, 2007
    #2
    1. Advertising

  3. hplayer03

    Lit Guest

    Hplayer03,

    Can you confirm if what Lee suggested below works for you or not?

    Thank you,

    Lit


    "lee whitbeck" <> wrote in message
    news:...
    > This should force the postback for you
    >
    > Response.AppendHeader("REFRESH", "0");
    >
    Lit, Jul 27, 2007
    #3
  4. hplayer03

    hplayer03 Guest

    On Jul 27, 11:39 am, "Lit" <> wrote:
    > Hplayer03,
    >
    > Can you confirm if what Lee suggested below works for you or not?
    >
    > Thank you,
    >
    > Lit
    >
    > "lee whitbeck" <> wrote in message
    >
    > news:...
    >
    > > This should force the postback for you

    >
    > > Response.AppendHeader("REFRESH", "0");


    thanks...that worked out for me...the only problem i ran into was when
    i used his code and forced the postback....my variables were lost so
    before i forced the postback i saved the variables to session and
    brought them back in when it came back...However, since i'm using
    asp.net 1.1 i have another small issue of the scroll position being
    lost. I'm told you need javascript for that. GoodLuck! Thanks for
    the reply Lee! You were very helpful!
    hplayer03, Jul 27, 2007
    #4
    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. Lamine Darbouche
    Replies:
    1
    Views:
    475
    Johannes Hammersen
    Jun 29, 2005
  2. Michael Groeger
    Replies:
    2
    Views:
    497
    Michael Groeger
    Jan 20, 2006
  3. leggolas
    Replies:
    3
    Views:
    28,050
    leggolas
    Mar 22, 2005
  4. Ravi Gudlavalleti

    disabling buttons while in edit mode

    Ravi Gudlavalleti, Jun 14, 2004, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    150
    Rick Spiewak
    Jun 22, 2004
  5. Sharon McCarty

    disabling delete buttons in datagrid

    Sharon McCarty, Jan 17, 2005, in forum: ASP .Net Datagrid Control
    Replies:
    1
    Views:
    115
Loading...

Share This Page