473,408 Members | 1,734 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,408 software developers and data experts.

Button control


I have a button in my webform.aspx

And I have a htm document or page. What I want is that when I click on
the button I want to display the htm page. In other words it is just a
back button

Need help
thanks in advance
Justnew
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html

Nov 18 '05 #1
5 1451
onclick="javascript:history.go(-1);"

--
Curt Christianson
Owner/Lead Developer, DF-Software
www.Darkfalz.com
"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

I have a button in my webform.aspx

And I have a htm document or page. What I want is that when I click on
the button I want to display the htm page. In other words it is just a
back button

Need help
thanks in advance
Justnew
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html

Nov 18 '05 #2
Hi Justnew,

If you are using ASP.NET, it sounds like you want to attach to the OnClick
event of the button. If you are using VS.NET, you can do this easily by
going go the design view, click on your button, go to the properties view
and select events. Then dobule click the blank to the right of the "Click"
action.

Alternatively, you can add this code in your code-behind...

In InitializeComponent():
this.<Button Variable Name>.Click += new
System.EvenHandler(this.<functionToBeFiredWhenButt onIsClicked>);

private void <functionToBeFiredWhenButtonIsClicked>(object sender,
System.EventArgs e)
{
// you can do anything you want in here, including navigate the user to
other places using Response.Redirect.
}

Also, if you just want a "Back" button, then you can use client-side HTML
and JScript to achieve the same thing. Here's a link on it:
http://www.cyfi.com/support/websuppo...ack_button.htm

HTH,
Mark Jen [MSFT]
--
Please reply in newsgroup.
This posting is provided "AS IS" with no warranties, and confers no rights.

"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

I have a button in my webform.aspx

And I have a htm document or page. What I want is that when I click on
the button I want to display the htm page. In other words it is just a
back button

Need help
thanks in advance
Justnew
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html

Nov 18 '05 #3

Let me explain more. This project is asp.net and I am using vb.net. No
the start page is welcome.htm and here I have a link to webform1.aspx
Now when I click on the link it takes me to the webform1.aspx An
inside this webform1.aspx I have this button (back, or home The aim i
to enable to navigate to the startpage. In windows application,
usually double click on the button and enter this code like:
dim frm as new form1
frm.show
in asp.net I can not do that I tried to
dim frm as new htmlform
frm ="welcome.htm"
I am geting this annoying blue line on the code.

Mark Jen [MSFT] wrote:
*Hi Justnew,

If you are using ASP.NET, it sounds like you want to attach to th
OnClick
event of the button. If you are using VS.NET, you can do this easil
by
going go the design view, click on your button, go to the propertie
view
and select events. Then dobule click the blank to the right of th
"Click"
action.

Alternatively, you can add this code in your code-behind...

In InitializeComponent():
this.<Button Variable Name>.Click += new
System.EvenHandler(this.<functionToBeFiredWhenButt onIsClicked>);

private void <functionToBeFiredWhenButtonIsClicked>(object sender,
System.EventArgs e)
{
// you can do anything you want in here, including navigate the use
to
other places using Response.Redirect.
}

Also, if you just want a "Back" button, then you can use client-sid
HTML
and JScript to achieve the same thing. Here's a link on it:
http://tinyurl.com/2wnya

HTH,
Mark Jen [MSFT]
--
Please reply in newsgroup.
This posting is provided "AS IS" with no warranties, and confers n
rights.

"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

I have a button in my webform.aspx

And I have a htm document or page. What I want is that when I clic

on
the button I want to display the htm page. In other words it i

just a
back button

Need help
thanks in advance
Justnew


------------------------------------------------------------------------
Posted via http://www.mcse.ms


------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html


Justne
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.htm

Nov 18 '05 #4
Call Response.Redirect from your Button_Click Sub. Here is an example:

private void Button1_Click(object sender, System.EventArgs e)
{
Response.Redirect(http://localhost/Welcome.html);
}

You can redirect to any page (even those which don't belong to your program,
like yahoo.com)

Hope this helps,
"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

Let me explain more. This project is asp.net and I am using vb.net. Now
the start page is welcome.htm and here I have a link to webform1.aspx.
Now when I click on the link it takes me to the webform1.aspx And
inside this webform1.aspx I have this button (back, or home The aim is
to enable to navigate to the startpage. In windows application, I
usually double click on the button and enter this code like:
dim frm as new form1
frm.show
in asp.net I can not do that I tried to
dim frm as new htmlform
frm ="welcome.htm"
I am geting this annoying blue line on the code.

Mark Jen [MSFT] wrote:
*Hi Justnew,

If you are using ASP.NET, it sounds like you want to attach to the
OnClick
event of the button. If you are using VS.NET, you can do this easily
by
going go the design view, click on your button, go to the properties
view
and select events. Then dobule click the blank to the right of the
"Click"
action.

Alternatively, you can add this code in your code-behind...

In InitializeComponent():
this.<Button Variable Name>.Click += new
System.EvenHandler(this.<functionToBeFiredWhenButt onIsClicked>);

private void <functionToBeFiredWhenButtonIsClicked>(object sender,
System.EventArgs e)
{
// you can do anything you want in here, including navigate the user
to
other places using Response.Redirect.
}

Also, if you just want a "Back" button, then you can use client-side
HTML
and JScript to achieve the same thing. Here's a link on it:
http://tinyurl.com/2wnya

HTH,
Mark Jen [MSFT]
--
Please reply in newsgroup.
This posting is provided "AS IS" with no warranties, and confers no
rights.

"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

I have a button in my webform.aspx

And I have a htm document or page. What I want is that when I click

on
the button I want to display the htm page. In other words it is

just a
back button

Need help
thanks in advance
Justnew

------------------------------------------------------------------------
Posted via http://www.mcse.ms

------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html
*

Justnew
------------------------------------------------------------------------
Posted via http://www.mcse.ms
------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html

Nov 18 '05 #5

Thank you Martha
It works thanks for the help
Martha[MSFT] wrote:
*Call Response.Redirect from your Button_Click Sub. Here is a
example:

private void Button1_Click(object sender, System.EventArgs e)
{
Response.Redirect(http://localhost/Welcome.html);
}

You can redirect to any page (even those which don't belong to you
program,
like yahoo.com)

Hope this helps,
"Justnew" <Ju************@mail.mcse.ms> wrote in message
news:Ju************@mail.mcse.ms...

Let me explain more. This project is asp.net and I am using vb.net

Now
the start page is welcome.htm and here I have a link t

webform1.aspx.
Now when I click on the link it takes me to the webform1.aspx And
inside this webform1.aspx I have this button (back, or home The ai

is
to enable to navigate to the startpage. In windows application, I
usually double click on the button and enter this code like:
dim frm as new form1
frm.show
in asp.net I can not do that I tried to
dim frm as new htmlform
frm ="welcome.htm"
I am geting this annoying blue line on the code.

Mark Jen [MSFT] wrote:
Justnew


------------------------------------------------------------------------
Posted via http://www.mcse.ms


------------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.html


Justne
-----------------------------------------------------------------------
Posted via http://www.mcse.m
-----------------------------------------------------------------------
View this thread: http://www.mcse.ms/message347224.htm

Nov 18 '05 #6

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

Similar topics

3
by: Tom Asken | last post by:
Short version: IE 6.0 wrongly posts <button ..> value. Internet Explorer should only post the value of the clicked submit button - but IE 6 posts the value of several submit buttons if they have...
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. ...
4
by: MJW | last post by:
Is there a way for me to know if or which command button was just clicked that triggers the LostFocus event for the current control on a Form? I have a form that has many types of users who each...
9
by: Melissa | last post by:
What is the code to delete a command button from a form? Can the code be run from the click event of the button to be deleted? Thanks! Melissa
8
by: Zelin Lu | last post by:
Hello, All I am building two user controls and dynamicly load one them into a PlaceHolder. But the button on the user control doesn't work fine. I need to click twice to fire the event? ...
18
by: jrhoads23 | last post by:
Hello, I am trying to find a way to tell if an .NET windows forms Button (System.Windows.Forms.Button) is "depressed" (pushed down). For my application, I can not use a check box control set to...
2
by: strout | last post by:
It's a pain to create each button with 2 images: button_on.gif button_off.gif I am looking for a control that have on/off two states, preferred as BACKGROUND images and with button text on it. ...
14
by: clintonG | last post by:
This is an appeal for peer support sent to Microsoft as will be noted in closing. The Login control does not include a Cancel button. The only option is to convert the Login control to a...
1
by: Jeff Lynch | last post by:
I'd like to add the following attributes to the Login control's Login Button to create a CSS rollover effect. How can I access the control's login button from the page's code-behind? ...
5
by: gregarican | last post by:
There is a C# CTI app I'm working on using Visual Studio 2005 at revision level 8.0.50727-7600. I need a couple of Windows Form Button controls to emulate line buttons on a telephone. So I went to...
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
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
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
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:
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
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...
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,...
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...
0
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...

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.