Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > Disabling buttons in ASP.net 1.1

Reply
Thread Tools

Disabling buttons in ASP.net 1.1

 
 
hplayer03
Guest
Posts: n/a
 
      07-27-2007
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

 
Reply With Quote
 
 
 
 
lee whitbeck
Guest
Posts: n/a
 
      07-27-2007
This should force the postback for you

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

 
Reply With Quote
 
 
 
 
Lit
Guest
Posts: n/a
 
      07-27-2007
Hplayer03,

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

Thank you,

Lit


"lee whitbeck" <(E-Mail Removed)> wrote in message
news:(E-Mail Removed) ps.com...
> This should force the postback for you
>
> Response.AppendHeader("REFRESH", "0");
>



 
Reply With Quote
 
hplayer03
Guest
Posts: n/a
 
      07-27-2007
On Jul 27, 11:39 am, "Lit" <(E-Mail Removed)> wrote:
> Hplayer03,
>
> Can you confirm if what Lee suggested below works for you or not?
>
> Thank you,
>
> Lit
>
> "lee whitbeck" <(E-Mail Removed)> wrote in message
>
> news:(E-Mail Removed) ps.com...
>
> > 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!

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Disabling Back Button and Refresh Buttons tessythampan Software 1 12-18-2007 09:13 PM
Problem w/ disabling buttons after onclick on clientside Michael Groeger ASP .Net 2 01-20-2006 01:18 PM
Disabling the default selection of buttons in a form Lamine Darbouche ASP .Net 1 06-29-2005 11:17 AM
JFrame, disabling the minimize and maximize buttons leggolas Java 3 03-22-2005 12:46 AM
disabling buttons while in edit mode Ravi Gudlavalleti ASP .Net Datagrid Control 1 06-22-2004 11:07 AM



Advertisments