473,672 Members | 2,682 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 1481
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
3624
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
7595
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
1480
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
26847
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
1591
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
1796
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
8354
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
2031
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
3149
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
8423
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
8948
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...
0
8851
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
8701
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...
1
6261
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
4246
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
4446
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
2
2097
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
1842
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.