Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
HomeAnnouncementsFree MagazinesWhite PapersSubmit Content
Discussion GroupsASP.NETWindows FormsLanguages.NET FrameworkVisual Studio.NET
Articles.NET FrameworkASP.NETToolsWindows Forms
.NET DirectoryOpen Source ProjectsUser GroupsWeb Resources
Related Topics
Visual Basic 6SQL ServerMS AccessOther DB ProductsMS Server ProductsMore Topics ...

.NET Forum / ASP.NET / General / July 2007

Tip: Looking for answers? Try searching our database.

Disabling buttons in ASP.net 1.1

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
hplayer03 - 27 Jul 2007 14:21 GMT
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
lee whitbeck - 27 Jul 2007 14:53 GMT
This should  force the postback for you

Response.AppendHeader("REFRESH", "0");
Lit - 27 Jul 2007 16:39 GMT
Hplayer03,

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

Thank you,

Lit

> This should  force the postback for you
>
> Response.AppendHeader("REFRESH", "0");
hplayer03 - 27 Jul 2007 18:56 GMT
> Hplayer03,
>
[quoted text clipped - 7 lines]
>
> > 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!

Free Magazines

Get these publications absolutely FREE for up to 12 months. There are no hidden fees and no obligation. Simply choose a title, complete the application form and submit it. Read more ...

Oracle MagazineNetwork ComputingComputer WorldBio-IT WorldeWeekInformation WeekInfosecurity
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.