473,473 Members | 1,752 Online
Bytes | Software Development & Data Engineering Community
Create Post

Home Posts Topics Members FAQ

Disabling buttons in ASP.net 1.1

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

Jul 27 '07 #1
3 1428
This should force the postback for you

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

Jul 27 '07 #2
Lit
Hplayer03,

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

Thank you,

Lit
"lee whitbeck" <le*********@hotmail.comwrote in message
news:11*********************@22g2000hsm.googlegrou ps.com...
This should force the postback for you

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

Jul 27 '07 #3
On Jul 27, 11:39 am, "Lit" <sql_agent...@hotmail.comwrote:
Hplayer03,

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

Thank you,

Lit

"lee whitbeck" <leewhitb...@hotmail.comwrote in message

news:11*********************@22g2000hsm.googlegrou 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!

Jul 27 '07 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

0
by: Philippe Meunier | last post by:
Hi, I am using the .NET toolbar with VB.NET 2003. My toolbar uses icons images that are actually PNG files and uses alpha blending on it. So to make alpha blending work correctly with the...
3
by: Jo | last post by:
Hi I've got a .NET web application and once a user presses a certain button the the page I'd like to disable other buttons straight away so that the user can't press anything else while...
1
by: Chris | last post by:
Hi Can you disable particular radiobuttons in a radibuttonlist control? I know you can disable the entire radiobutton list, but I'm interested in disabling radio buttons within the...
5
by: Lyn | last post by:
Hi, I hope someone can help. I have a main form which mostly fills the Access window. In the bottom half of this form I have a tab control to display various types of data related to the main...
1
by: markeboy | last post by:
What is the workaround to prevent toolbar buttons from displaying a grey square where the image should be once the toolbar button is disabled I have transparent color of the image list set to...
1
by: Lamine Darbouche | last post by:
Please Help, I have a form with multiple buttons "New User", "Delete User", "Save" buttons, when I access the form it selects the "New User" button by default, so when you hit the return key...
2
by: dougawells | last post by:
Hi- I'm wanting to have a set of radio buttons disabled when a form is displayed, then if they check another specific radio button, those would become enabled. I've tried setting it via...
0
by: Carlo \(MCP only\) | last post by:
Hi all I'm trying to disable (or remove/hide) the three small buttons that appears on the RIGHT edge of a MDIparent menu bar when a contained MDIchild form is maximized. Please note that I'm...
20
by: Geoff Cox | last post by:
Hello, I am not at clear how to tackle this one. Say the note middle C is played, just once. Then when the user clicks on a play image a series of notes are played starting with middle C...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
0
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated ...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.