473,396 Members | 2,154 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

back button

How can I realize back button in IE in my c# asp.net code in a web application?
Oct 31 '06 #1
3 1031
You can't with C#, as C# is server side, not client side. you have to do
browser magic in JavaScript. You can disable like so:

<body onLoad="history.go(+1)">

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.com...
How can I realize back button in IE in my c# asp.net code in a web
application?

Oct 31 '06 #2
Thank you for your reply. I have never used Java script in the application,
can you give me more example how I should include this to my application.

"Cowboy (Gregory A. Beamer)" wrote:
You can't with C#, as C# is server side, not client side. you have to do
browser magic in JavaScript. You can disable like so:

<body onLoad="history.go(+1)">

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:45**********************************@microsof t.com...
How can I realize back button in IE in my c# asp.net code in a web
application?


Oct 31 '06 #3
With that particular bit, just replace the body tag in HTML with that tag.
if you want all pages to have that, you can alter the default page templates
under the Visual Studio folder for the language type.

By default (Visual Studio 2005):
VB.NET = C:\Program Files\Microsoft Visual Studio 8\VB
C# = C:\Program Files\Microsoft Visual Studio 8\VC#

Do a search for *.aspx on the folder in question and open and edit the body
tag. Do not replace any of the template tags. I do this to get rid of the
default grid view, as I would rather lay things out with CSS.

The history.go(+1) essentially sticks history into an invalid (future)
state. If a person clicks back, it will reopen the current page, which, once
again, sets history to a future state ... ad nauseum.

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*************************************************
Think outside of the box!
*************************************************
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:3A**********************************@microsof t.com...
Thank you for your reply. I have never used Java script in the
application,
can you give me more example how I should include this to my application.

"Cowboy (Gregory A. Beamer)" wrote:
>You can't with C#, as C# is server side, not client side. you have to do
browser magic in JavaScript. You can disable like so:

<body onLoad="history.go(+1)">

--
Gregory A. Beamer
MVP; MCP: +I, SE, SD, DBA
http://gregorybeamer.spaces.live.com

*********************************************** **
Think outside of the box!
*********************************************** **
"JIM.H." <JI**@discussions.microsoft.comwrote in message
news:45**********************************@microso ft.com...
How can I realize back button in IE in my c# asp.net code in a web
application?



Oct 31 '06 #4

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

Similar topics

25
by: KK | last post by:
Hi, I am using history.go(-1) for implementing the back button functionality. Its working fine but with this exception. 1. The page which is having back button has some hyperlinks on it. ...
8
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...
6
by: Mark | last post by:
I have two dropdown lists. Both have autopostback set to true. In both dropdowns, when you select an item from the list, it redirects to the Value property of the dropdown. Nothing fancy. ...
29
by: Tom wilson | last post by:
I can't believe this is such an impossibility... I have an asp.net page. It accepts data through on form fields and includes a submit button. The page loads up and you fill out some stuff. ...
6
by: tshad | last post by:
I am trying to set up a Javascript popup box that has a way of sending back a message to asp.net on how to process some data. At the moment I am just doing: ...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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...
0
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...

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.