Disabling buttons in ASP.net 1.1

  • Thread starter Thread starter hplayer03
  • Start date Start date
H

hplayer03

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,

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

Thank you,

Lit

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!
 
Back
Top