Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 1.0 and 1.1 > ASP.NET 1.1
|
ASP.NET 1.1 As of 10/6/2005, this forum is locked as part of the reorganization described here: http://p2p.wrox.com/topic.asp?TOPIC_ID=35394. No posts have been deleted. Open ongoing discussions from the last week have been moved to either ASP.NET 1.0 and 1.1 Beginners http://p2p.wrox.com/asp-net-1-0-1-1-basics-60/ or ASP.NET 1.0 and 1.1 Professional. http://p2p.wrox.com/forum.asp?FORUM_ID=50. See my sticky post inside for more.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 1.1 section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old April 23rd, 2004, 11:17 AM
Friend of Wrox
 
Join Date: Jul 2003
Posts: 142
Thanks: 0
Thanked 2 Times in 2 Posts
Default Really, really simple question

Could someone answer this before I go totally mental...

I have a button on a page. When it is clicked I want to navigate to another page. I don't want to use a hyperlink, or anything like that, just the button. How do I do it?

Thanks

 
Old April 23rd, 2004, 11:30 AM
Authorized User
 
Join Date: Jan 2004
Posts: 18
Thanks: 0
Thanked 0 Times in 0 Posts
Default

Hey,
Go to the onclick event of your button and type...
Code:
response.redirect("thepage.aspx")
just like asp classic.
You could also use the server.transfer method (also used in the click event of your button) as decribed at http://www.developer.com/net/asp/article.php/3299641 and http://www.aspfree.com/c/a/ASP-Code/...ansfer-Method/
Server.transfer is cool. You can create a property on your first page and then access it from the second page. Like this:
Code:
'page one
 Public ReadOnly Property SearchBox() As String
        Get
            Return Me.TxtSearch.Text
        End Get
    End Property


'page two
    Public SearchBox2 As home 'where home is the name of the class on page one
    SearchBox2 = CType(Context.Handler, home)
'.searchBox is the property from the first page
    Dim sSearch As String = SearchBox2.SearchBox.ToString

mark
 
Old April 23rd, 2004, 11:04 PM
Friend of Wrox
 
Join Date: Jun 2003
Posts: 996
Thanks: 2
Thanked 11 Times in 11 Posts
Send a message via Yahoo to melvik
Default

u can also use JavaScript in a HTML button instead as
Code:
<INPUT type="button" value="Button" onclick="window.location.href='ur_page_address'">
HTH.

Always:),
Hovik Melkomian.
 
Old April 24th, 2004, 09:04 PM
Authorized User
 
Join Date: Apr 2004
Posts: 12
Thanks: 0
Thanked 0 Times in 0 Posts
Send a message via ICQ to ³Â×÷
Default

ºÇºÇ £¡£¡Â¥ÉϵıȽϲ»´í£¡






Similar Threads
Thread Thread Starter Forum Replies Last Post
not at all simple question petergoodman XSLT 0 July 18th, 2008 08:37 AM
Very Simple Question YoungLuke C# 2 May 4th, 2007 02:23 AM
Simple Question ironchef Java GUI 0 September 14th, 2006 04:56 PM
Simple Question dpkbahuguna Java Basics 2 May 19th, 2006 12:05 AM
Simple question happyheart_man Pro VB.NET 2002/2003 0 January 14th, 2004 11:38 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.