473,396 Members | 1,693 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.

asp:buttion , history.back

Hello,

how do I do history back when asp:button is clicked? I
can't use <input button> - I have to use asp:button.
Thanks!
Nov 17 '05 #1
4 19571
Hi

myButton.Attributes.Add("onclick","history.back()" );

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <se************@countrywide.com> wrote in message
news:04****************************@phx.gbl...
Hello,

how do I do history back when asp:button is clicked? I
can't use <input button> - I have to use asp:button.
Thanks!

Nov 17 '05 #2


I tried this already - it doesn't work for me. A button
click causes postback to server. Is there a way to cancel
postback? Here is my script code:

<asp:Button CssClass="AllButtons" CausesValidation="False"
Width="100px" Height="28px" Runat="server" Text="Back"
ID="NavBack" Enabled="True"></asp:Button>
and I added:
NavBack.Attributes.Add("onclick","history.back()") ;
in the Page_Load.....
thanks
Sergey

-----Original Message-----
Hi

myButton.Attributes.Add("onclick","history.back() ");

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <se************@countrywide.com> wrote in messagenews:04****************************@phx.gbl...
Hello,

how do I do history back when asp:button is clicked? I
can't use <input button> - I have to use asp:button.
Thanks!

.

Nov 17 '05 #3

NavBack.Attributes.Add("onclick","history.back(); return false");

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <se************@countrywide.com> wrote in message
news:02****************************@phx.gbl...


I tried this already - it doesn't work for me. A button
click causes postback to server. Is there a way to cancel
postback? Here is my script code:

<asp:Button CssClass="AllButtons" CausesValidation="False"
Width="100px" Height="28px" Runat="server" Text="Back"
ID="NavBack" Enabled="True"></asp:Button>
and I added:
NavBack.Attributes.Add("onclick","history.back()") ;
in the Page_Load.....
thanks
Sergey

-----Original Message-----
Hi

myButton.Attributes.Add("onclick","history.back() ");

--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <se************@countrywide.com> wrote in

message
news:04****************************@phx.gbl...
Hello,

how do I do history back when asp:button is clicked? I
can't use <input button> - I have to use asp:button.
Thanks!

.

Nov 17 '05 #4

Thank you Vidar.

Sergey

-----Original Message-----

NavBack.Attributes.Add("onclick","history.back( ); return false");
--
Best Regards
Vidar Petursson
==============================
Microsoft Internet Client & Controls MVP
==============================
"szabelin" <se************@countrywide.com> wrote in messagenews:02****************************@phx.gbl...


I tried this already - it doesn't work for me. A button
click causes postback to server. Is there a way to cancel postback? Here is my script code:

<asp:Button CssClass="AllButtons" CausesValidation="False" Width="100px" Height="28px" Runat="server" Text="Back"
ID="NavBack" Enabled="True"></asp:Button>
and I added:
NavBack.Attributes.Add("onclick","history.back()") ;
in the Page_Load.....
thanks
Sergey

>-----Original Message-----
>Hi
>
>myButton.Attributes.Add("onclick","history.back() ");
>
>--
>Best Regards
> Vidar Petursson
> ==============================
>Microsoft Internet Client & Controls MVP
> ==============================
>"szabelin" <se************@countrywide.com> wrote in

message
>news:04****************************@phx.gbl...
>> Hello,
>>
>> how do I do history back when asp:button is clicked? I >> can't use <input button> - I have to use asp:button.
>>
>>
>> Thanks!
>
>
>.
>

.

Nov 17 '05 #5

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

Similar topics

8
by: BadOmen | last post by:
I have used WinObj=window.open ("http://www.some_page","Holder") No I want to press a button in an other window and make the Holder windows history.go(-1) is that possible? (I'm not using a...
3
by: Rob | last post by:
Each time a webform is posted back (submitted), another URL is added to the browser's history list. My web application allows a back button to return to previously visited pages, but I do not wish...
3
by: Ben | last post by:
I'm having problems with cookies from asp.net to asp back to asp.net. It seems like I can set a cookie in asp.net fine, and alter it at will, as soon as asp touches it, asp.net won't have...
4
by: Tim Marsden | last post by:
Hi, If I navigate from Page1 to Page2 then to Page3, using the response.redirect. When the user press the Back button, I what then to go to Page 1 and start again, not Page2. I dont want the...
20
by: Dan | last post by:
Is there a way to obtain the last page visited? I don't want to go to that page, I just want to be able find out what page they came from, the url of that page. Is this possible?
12
by: Jeff | last post by:
I need to make a response.redirect that will take the user back 2 pages after they login. How can i implement this into response.redirect ? Thanks
4
by: Scott Shuster | last post by:
Hi, I've been searching and testing and have not yet found the answer I'm looking for. I have an ASP.NET (vb) application with an ecommerce function. When the user submits the page, I DON'T...
2
by: =?Utf-8?B?Y2FzaGRlc2ttYWM=?= | last post by:
Hi, Is it possible to clear the recent history so that a link with the href "javascript:window.history.back()" doesn't record any postbacks? For example, if I the user makes a few selections...
2
by: Max | last post by:
I recently moved to ASPnet Ext 3.5 What I can't get with Ajax and History browser managemet is this: User fills some fields (dropdown and textbox) on page 1 (all are in an update panel) User...
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: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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,...
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
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
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
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,...

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.