Disabling buttons in ASP.net 1.1

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
 
L

Lit

Hplayer03,

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

Thank you,

Lit
 
H

hplayer03

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!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,769
Messages
2,569,580
Members
45,055
Latest member
SlimSparkKetoACVReview

Latest Threads

Top