473,804 Members | 3,034 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

problem with back button

Hey guys,

I have a problem with events misfiring when the back button is used.

I have two controls (a drop-down list and a text field) and two buttons, one
for each of the controls, on a "quick search" type bar/control. When I
click the button that submits the drop-down list, I do some processing on
the button click event postback, and redirect to another page. That's fine.
The problem is, when I hit the browser BACK button, and then attempt to
click the button to submit the text field this time, the event for the
dropdown list button fires instead, that is, the event that I called
previously.

What gives? Any ideas?

ib.
Nov 18 '05 #1
2 1496
I like this model. Set up a panel for each step. Make all but the first
invisible. Force the user to click a button for each step, which you can get
rid of as you step down (Visible = false). You still have all elements in
the ViewState, but you divide out the user experience into logical steps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** ***
Think outside the box!
*************** *************** *************** *************** ***
"Ireney Berezniak" <ir************ **@hotmail.com> wrote in message
news:LpXcc.1939 5$J56.12531@edt nps89...
Hey guys,

I have a problem with events misfiring when the back button is used.

I have two controls (a drop-down list and a text field) and two buttons, one for each of the controls, on a "quick search" type bar/control. When I
click the button that submits the drop-down list, I do some processing on
the button click event postback, and redirect to another page. That's fine. The problem is, when I hit the browser BACK button, and then attempt to
click the button to submit the text field this time, the event for the
dropdown list button fires instead, that is, the event that I called
previously.

What gives? Any ideas?

ib.

Nov 18 '05 #2
I like this model. Set up a panel for each step. Make all but the first
invisible. Force the user to click a button for each step, which you can get
rid of as you step down (Visible = false). You still have all elements in
the ViewState, but you divide out the user experience into logical steps.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA

*************** *************** *************** *************** ***
Think outside the box!
*************** *************** *************** *************** ***
"Ireney Berezniak" <ir************ **@hotmail.com> wrote in message
news:LpXcc.1939 5$J56.12531@edt nps89...
Hey guys,

I have a problem with events misfiring when the back button is used.

I have two controls (a drop-down list and a text field) and two buttons, one for each of the controls, on a "quick search" type bar/control. When I
click the button that submits the drop-down list, I do some processing on
the button click event postback, and redirect to another page. That's fine. The problem is, when I hit the browser BACK button, and then attempt to
click the button to submit the text field this time, the event for the
dropdown list button fires instead, that is, the event that I called
previously.

What gives? Any ideas?

ib.

Nov 18 '05 #3

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

Similar topics

0
3632
by: Amy | last post by:
When accessing my JSP I get the following error: org.apache.jasper.JasperException: Missing message for key button.next Can anyone tell me what the problem is? I have tried to figure this out but am new to building webapps and struts. Thank you for your help. My JSP has : <html:form action="/ContactAction">
5
569
by: fripper | last post by:
I posted this problem a couple of days ago but felt I might have better luck re-stating the problem. Apparently I messed up IIS (v. 5) somehow because I am suddenly unable to load web forms! A simple example will help. I created a simple web project that contains two simple forms ... WebForm1 and WebForm2. WebForm1 has a button which when clicked simply does a Response.Redirect("WebForm2.aspx"). When I run the program and click the...
4
7650
by: Hypo | last post by:
I added a 'Back' button to my page, and wrote 'OnClick' code something like this: Response.Write("<script>history.go(-" + iDepthIndex.ToString() + ");</script>"); But, it dosnt work! Effect is that browser navigates to desired page as expected and go back from where it started! But, the 'Back' button on browser works normaly. I dont get it!!??
3
1484
by: Quentin Huo | last post by:
Hi: When I tried the following code, I got an error: if I clicked "Click me" button more than one time, and than click "back" button in the IE browser Toolbar, I will get an error: "The page cannot be displayed......". But I won't get any error if I only click the "click me" button one time and then click the browser's "Back" button.
11
26907
by: Russ | last post by:
My web app writes some binary data to a file at the client site via Response.Write and Response.BinaryWrite. This action is accomplished in response to a button click, with C# code behind as follows: private void SubmitButton_Click (object sender, System.EventArgs e) { // Set up the response to write the print file to the client Response.Clear (); Response.AppendHeader ("Content-Disposition", "filename=WebPrint.prn");
0
1603
by: anandv81 | last post by:
Hi, I encountered a strange problem while working on an application, the problem goes like this. I am generating a few textboxes at runtime at the server side and added to a placeholder, a value is set for each of the textboxes. There is a button that causes the page to be posted back and the texboxes are re-rendered. When the textboxes are re-rendered the values are reset and these texboxes are again added to the placeholder. The names
8
1806
by: Nacho | last post by:
Hello people I have the following problem I have a private area in my site. The user enters the username and password, then clicks "enter" and the session is created and also a session variable is created and set to true. Every page of the private area, checks whether this session variable is set to true and then if so, it gives you access, otherwise it redirects
7
8362
by: mohammed.naghman | last post by:
Hi, I have 2 submit buttons in a jsp page. One of them takes me to page2.jsp and also passes the values enetered to page2.I have a link in the page2 that does a history.back to come to the previous page to make any chnages necessary. Now after making my changes, instead of going to page2.jsp if I want to submit the page, Instead of submitting the page it takes me to page2.jsp again. This problem is only with firefox. It works fine...
8
2039
by: =?Utf-8?B?V2ViQnVpbGRlcjQ1MQ==?= | last post by:
I the page knows there was a cross post back. but i can not find the control. (asp.net 3.5) calling page has a master calling control: <asp:Button ID="btnSendAlert" runat="server" Text="Go" onclick="btnSendAlert_Click" PostBackUrl="ItemUpLoadAdmin.aspx" CommandArgument="5" />
2
3158
by: swethak | last post by:
Hi, I am getting the problem the problem with google map in Internet Explorer. This map worked fine in mozilla . When i opened the same map in Internet Explorer i am getting the error message as in alert box as " Internet Explorer cannot open the Internet site http://google.citycarrentals.com.au/viewalllocations.php . Operation aborted". It is working in Mozilla . Here i mentioned my code . I am facing this problem several...
0
9572
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10562
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
1
10303
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
0
10070
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
9132
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, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5508
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 last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
5639
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4282
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 we have to send another system
2
3803
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

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.