473,748 Members | 10,028 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Strange Problem When Using Browser back button

OK, I have a fairly simple setup where I have an Index of records which are
displayed using a datagrid on a page. When you click the link associated
with a Row (ArticleID) , this ID is passed to a page which creates an new
Article or Retreive an existing one depending if there is an ArticleID
passed to it.

So on my index page the user will be directed to the article page and will
either pick up an existing one or have a new one created.

Create New Article Link

or

IDno XXX XXX XX
IDno XXX XXX XX
So Far So Good. . . . .

Once the new article is created, the if the user uses the back button to go
to the index and refreshed it, a new Article is created even though there is
no code for this on the ArticleIndex.as px page. It is if the refresh is
posting the last page and the index. If however, I provide a link on the
Article page to go back to the index, this problem does not occur.

Any ideas on this one ????

Cheers
--
Best Regards

The Inimitable Mr Newbie º¿º
Dec 29 '05 #1
5 1897
hey mr newbie (dig the signature btw!)
it would help if you could describe how the sequence of events is performed,
in terms of the controls used (buttons, linkbuttons, html hyperlinks,
asp:hyperlinks, etc) and how you use and handle the postbacks in each page.

from your initial description, i can't imagine why it would be happening.
is the same article being created when you press back? did you try it with
IE and Firefox just to be sure it isn't a browser cache problem or
something?

hopefully we can figure it out with a little more info on the nuts and bolts
side of things.
cheers
tim

--------------------------
blog: http://tim.mackey.ie

"Mr Newbie" <he**@now.com > wrote in message
news:OO******** ******@TK2MSFTN GP14.phx.gbl...
OK, I have a fairly simple setup where I have an Index of records which
are displayed using a datagrid on a page. When you click the link
associated with a Row (ArticleID) , this ID is passed to a page which
creates an new Article or Retreive an existing one depending if there is
an ArticleID passed to it.

So on my index page the user will be directed to the article page and will
either pick up an existing one or have a new one created.

Create New Article Link

or

IDno XXX XXX XX
IDno XXX XXX XX
So Far So Good. . . . .

Once the new article is created, the if the user uses the back button to
go to the index and refreshed it, a new Article is created even though
there is no code for this on the ArticleIndex.as px page. It is if the
refresh is posting the last page and the index. If however, I provide a
link on the Article page to go back to the index, this problem does not
occur.

Any ideas on this one ????

Cheers
--
Best Regards

The Inimitable Mr Newbie º¿º

Dec 29 '05 #2
Thanks for your reply.

This does not happen with NN ( not sure about FF ). With IE, it does give
the message when the refresh is attempted which says something like. "You
will have to resubmit the form", this does not get asked with NN.

I think what is happening is that the last form is resumitted ( Artice
Form ) even though it is the Index form which is currently being displayed.

As for describing the events.

Index Page_Load
'Fill the datagrid with all articles.
'Thats it.

Article Page_Load

If this is postback then retreive Article and Sections from Session

Else

If an ArticelID was passed then
retreive the Articel and Sections from the SQL Server
else
Create new Articele Store in Database.
End If

Store Article and Section Info In Session

End If
Hope this gives u something to go with.

--
Best Regards

The Inimitable Mr Newbie º¿º
"Tim_Mac" <Tim at mackey dot eye eee> wrote in message
news:%2******** *******@TK2MSFT NGP10.phx.gbl.. .
hey mr newbie (dig the signature btw!)
it would help if you could describe how the sequence of events is
performed, in terms of the controls used (buttons, linkbuttons, html
hyperlinks, asp:hyperlinks, etc) and how you use and handle the postbacks
in each page.

from your initial description, i can't imagine why it would be happening.
is the same article being created when you press back? did you try it
with IE and Firefox just to be sure it isn't a browser cache problem or
something?

hopefully we can figure it out with a little more info on the nuts and
bolts side of things.
cheers
tim

--------------------------
blog: http://tim.mackey.ie

"Mr Newbie" <he**@now.com > wrote in message
news:OO******** ******@TK2MSFTN GP14.phx.gbl...
OK, I have a fairly simple setup where I have an Index of records which
are displayed using a datagrid on a page. When you click the link
associated with a Row (ArticleID) , this ID is passed to a page which
creates an new Article or Retreive an existing one depending if there is
an ArticleID passed to it.

So on my index page the user will be directed to the article page and
will either pick up an existing one or have a new one created.

Create New Article Link

or

IDno XXX XXX XX
IDno XXX XXX XX
So Far So Good. . . . .

Once the new article is created, the if the user uses the back button to
go to the index and refreshed it, a new Article is created even though
there is no code for this on the ArticleIndex.as px page. It is if the
refresh is posting the last page and the index. If however, I provide a
link on the Article page to go back to the index, this problem does not
occur.

Any ideas on this one ????

Cheers
--
Best Regards

The Inimitable Mr Newbie º¿º


Dec 29 '05 #3
hi,
it sounds like you are using a button or linkButton in the datagrid on the
index page, to select the item and redirect to the article page? when you
do it this way, you are obviously causing a postback on the index page, and
then a redirect to the article page.
the way IE sees these events in terms of browser history is:

Index Page > Index Page (PostBack) > Article Page

so when you click back from the Article page, you are only going back to the
Postback. i'm guessing Netscape sees it as:

Index Page > Article Page

and doesn't bother counting the postback to the same page in the browser
history, which i think is smart.

you could change from a Button to a plain old Html Hyperlink in the
datagrid, which will just redirect the user because they clicked on a link,
not because they caused a form postback. this way the browser back/forward
should work fine in any browser.

let me know if i am understanding the situation properly
thanks
tim
Dec 29 '05 #4
You are understanding it correctly. Im not sure how I can use a plain
hyperlink as I need the articleID to pass as the parameter, so how would I
get that from the table ? - Have not thought it through yet !

--
Best Regards

The Inimitable Mr Newbie º¿º
"Tim_Mac" <Tim at mackey dot eye eee> wrote in message
news:Ot******** *****@tk2msftng p13.phx.gbl...
hi,
it sounds like you are using a button or linkButton in the datagrid on the
index page, to select the item and redirect to the article page? when you
do it this way, you are obviously causing a postback on the index page,
and then a redirect to the article page.
the way IE sees these events in terms of browser history is:

Index Page > Index Page (PostBack) > Article Page

so when you click back from the Article page, you are only going back to
the Postback. i'm guessing Netscape sees it as:

Index Page > Article Page

and doesn't bother counting the postback to the same page in the browser
history, which i think is smart.

you could change from a Button to a plain old Html Hyperlink in the
datagrid, which will just redirect the user because they clicked on a
link, not because they caused a form postback. this way the browser
back/forward should work fine in any browser.

let me know if i am understanding the situation properly
thanks
tim

Dec 29 '05 #5
hi,
i use something like this:

<asp:TemplateCo lumn HeaderText="ID" >
<ItemTemplate >
<a href='Edit_Emai l.aspx?ID=<%# DataBinder.Eval (Container,
"DataItem.I D") %>'>
<%# DataBinder.Eval (Container, "DataItem.I D") %>
</a>
</ItemTemplate>
</asp:TemplateCol umn>

is this possible in your situation?
tim

--------------------------
blog: http://tim.mackey.ie

"Mr Newbie" <he**@now.com > wrote in message
news:%2******** ********@TK2MSF TNGP14.phx.gbl. ..
You are understanding it correctly. Im not sure how I can use a plain
hyperlink as I need the articleID to pass as the parameter, so how would I
get that from the table ? - Have not thought it through yet !

--
Best Regards

The Inimitable Mr Newbie º¿º
"Tim_Mac" <Tim at mackey dot eye eee> wrote in message
news:Ot******** *****@tk2msftng p13.phx.gbl...
hi,
it sounds like you are using a button or linkButton in the datagrid on
the index page, to select the item and redirect to the article page?
when you do it this way, you are obviously causing a postback on the
index page, and then a redirect to the article page.
the way IE sees these events in terms of browser history is:

Index Page > Index Page (PostBack) > Article Page

so when you click back from the Article page, you are only going back to
the Postback. i'm guessing Netscape sees it as:

Index Page > Article Page

and doesn't bother counting the postback to the same page in the browser
history, which i think is smart.

you could change from a Button to a plain old Html Hyperlink in the
datagrid, which will just redirect the user because they clicked on a
link, not because they caused a form postback. this way the browser
back/forward should work fine in any browser.

let me know if i am understanding the situation properly
thanks
tim


Jan 1 '06 #6

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

Similar topics

3
2303
by: Andrew Mayo | last post by:
(note: reason for posting here; browser helper object is written in C++; C++ developers tend to know the intricacies of message handling; this looks like a Windows messaging issue) Microsoft very kindly make available a DLL (the browser helper DLL) which allows you to trap and disable the context menu (right mouse click) and various 'built-in' browser accelerators (such as ctrl+P which brings up the print dialogue, and F5, which will...
8
2581
by: Galina | last post by:
Hello I have 6 dependent list boxes on my ASP page:  Faculty;  Lecturer;  Course;  Course occurrence;  Group;  Week commencing date. When faculty is selected, lists of lecturers and courses are populated. When course is selected, lists of occurrences, groups and
5
2415
by: Dan | last post by:
Hi, I'm going crazy here, please help. I have a parent page that has a user control on it that bubbles up data from a dropdown menu. The drop down menus are populated by a set of radio buttons, each populates the drop downs with unique data. All works well, you check a radio button and the onbubbleevent fires loading the drop downs. A user can then select an item from the drop down and be forwarded (Respose.Redirect) to the appropriate...
6
3740
by: guoqi zheng | last post by:
In a regular html form, when user press "enter" key, the form will be submitted. However, in ASP.NET web form, a form will only be submitted (post back) when a special button is clicked. Many user get used to click "enter" key to submit a form. How can I use "enter" key to submit/postback in ASP.NET. Thank, Guoqi Zheng
2
2198
by: COHENMARVIN | last post by:
I have a form with a Submit button. The user fills out the form, clicks the submit button, and then the page posts back to itself. Every time the page posts back to itself, the "Page_Load" event fires. So if the user first types the URL of the page in the browser, the "Page_Load" event fires. Then he hits submit, and the form contents are posted back, so the "Page_Load" event fires again. The form appears again (I clear its contents),...
6
2271
by: Joseph Geretz | last post by:
Writing an Outlook AddIn with C#. For the user interface within Outlook I'm adding matching pairs of Toolbar buttons and Menu items. All of the buttons and menu items are wired up to send events to the same method (aka delegate?). I use the Tag property within this method to determine what user action is taking place. Very simple: When adding toolbar button: tbButton.Click += new...
6
3943
by: hemant.singh | last post by:
Hi all, I am trying to get a way by which I'll know exactly when user goes out of my site by clicking on close button in browser, So that w/e user click close button in browser, I can send a signal to server. This seems to be achievable with body unload events, but it is little too much, as even if user navigate within my site, this event will be generated, this can be avoided by handling onclick of each link, so that I'll know exactly...
6
4328
by: lucyh3h | last post by:
Hi, In one of my pages, I use javascript (AJAX) to populate one mulitple select field based on user's click event on another control. I noticed that when I navigate back to this page by clicking browser's "Back" button, the changes made to the multiple select is not preserved. (It shows the initial value). While all the other user selections are preserved. Firefox seems fine. How do I workaround this issue for IE?
1
3499
by: Rob | last post by:
I know this is an old one, considering how many posts I found on it but I just wondered if any best practises had popped up recently, especially as Ajax has increased JavaScript and DHTML's importance. I'm writing a database application. I like pop-up boxes so I've implemented one on my webpage using a floating DIV. The logic goes like this: 1. When the page is rendered (on the server), it adds "var DisplayPopup = false;" in the page...
0
8984
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main usage, and What is the difference between ONU and Router. Let’s take a closer look ! Part I. Meaning of...
0
8823
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
9530
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
9363
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...
1
9312
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
9238
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
6793
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
6073
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 then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
1
3300
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

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.