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

Move between web pages

I have two pages set up in .net and I am trying to code behing a command
button in c# so that when the button is clicked, it will open another page.
Can you tell me how to do it. Any help is greatly appreciated as I am new to
programming. Thanks.
Feb 24 '06 #1
2 2022
Hi Bill!

If you are using the 1.1 framework, then I would recommend using a standard
HTML button and a bit of client-side script to open a new window rather than
using the postback model of ASP .Net to do this.

<button onclick="window.open( 'http://yourpage' )">Click Me</button>

The model of ASP .Net 1.1 does not allow you to "post back" to another page.
ASP 2.0 allows you to specify the page to post back to.

Hope this helps!

"BIll Mills" wrote:
I have two pages set up in .net and I am trying to code behing a command
button in c# so that when the button is clicked, it will open another page.
Can you tell me how to do it. Any help is greatly appreciated as I am new to
programming. Thanks.

Feb 24 '06 #2
If you are in ASP.NET 2.0 and using as ASP.NET button, you can set the
PostBackUrl property to the page you want to go to, as in the example below:

<asp:Button ID="btnFindACruise" runat="server" Text="Back to Find A Cruise"
PostBackUrl="~/FindACruise.aspx"/>

Mary D

"Tyler Durham (Microsoft Services)" wrote:
Hi Bill!

If you are using the 1.1 framework, then I would recommend using a standard
HTML button and a bit of client-side script to open a new window rather than
using the postback model of ASP .Net to do this.

<button onclick="window.open( 'http://yourpage' )">Click Me</button>

The model of ASP .Net 1.1 does not allow you to "post back" to another page.
ASP 2.0 allows you to specify the page to post back to.

Hope this helps!

"BIll Mills" wrote:
I have two pages set up in .net and I am trying to code behing a command
button in c# so that when the button is clicked, it will open another page.
Can you tell me how to do it. Any help is greatly appreciated as I am new to
programming. Thanks.

Apr 28 '06 #3

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

Similar topics

17
by: black tractor | last post by:
HI there.. l was just wondering, if l place a "table" in the "editable region" of my template, will the text, graphics placed inside the this "table" MOVE BY ITSELF?? l mean, recently l had a...
2
by: cfmx | last post by:
I'm needing to move a database from SQL 7 to SQL 2000. What is the best way to accomplish this and keep all tables, data, permissions, etc in place throughout the move. Should I use BCP,...
1
by: Harald Weiser | last post by:
Good morning everybody. I would like to know if it is possible to move the mousepointer to another location with Javascript? For example Mouse.jumpTo(x,y) THX Harry
5
by: Galina | last post by:
Hello I have an Access 2000 application. The form has got a tab with 3 pages. There are several text boxes and command buttons on one page. I need to move them to another page (to free form space...
4
by: Vincent Yang | last post by:
I'm using Access 2002. My database is in Access 2000 format. I'm designing a form to collect responses to a 40-item questionnaire. I can fit four list boxes on a screen, so I plan to have 11 tab...
4
by: David Hearn | last post by:
I am trying to build a few pages basically emulating a wizard that you might find in a Windows product. A few fields to fill out on one page, move to the next, then the next. Finally, at the end,...
3
by: Wayne Wengert | last post by:
I am rewriting some ASP pages to move them to ASP.NET (VB). The old pages had some include files such as one that had the subroutine to create a connection as well as the code that invoked that...
10
by: Robert | last post by:
I have an app that was originally 1.1, now migrated to 2.0 and have run into some sporadic viewstate errors...usually saying the viewstate is invalid, eventvalidation failed or mac error. My web...
8
by: Gianni Rondinini | last post by:
hi all, i'm here again. i couldn't find/understand this on w3c css2 recommendation and documentation, then here i ask. i decided to still use some tables in my pages for some forms. i played...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: ryjfgjl | last post by:
ExcelToDatabase: batch import excel into database automatically...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: jfyes | last post by:
As a hardware engineer, after seeing that CEIWEI recently released a new tool for Modbus RTU Over TCP/UDP filtering and monitoring, I actively went to its official website to take a look. It turned...
0
by: ArrayDB | last post by:
The error message I've encountered is; ERROR:root:Error generating model response: exception: access violation writing 0x0000000000005140, which seems to be indicative of an access violation...
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 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 former...

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.