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

Calling another form

Hi

How can I move from one aspx page to another programmatically?

Thanks

Regards
Nov 18 '05 #1
6 1710
"John" <Jo**@nospam.infovis.co.uk> wrote in news:eSY4v5YqEHA.348
@TK2MSFTNGP15.phx.gbl:
Hi

How can I move from one aspx page to another programmatically?

Thanks


use response.redirect

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #2
Take a look at "Chapter 2 - Cross-Page Posting Techniques" in
http://www.daveandal.net/books/6744/samples.aspx

The three examples demonstrate changing the action of a form, using
response.redirect, using server.transfer and using a page reference; all
including the issues of passing values form one page to another.
Nov 18 '05 #3
If I use Response.Redirect("page2", false) to redirect to page 2 from this
page, how can I tell page 2 to return to this page when done?

Thanks

Regards
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn***************************@140.99.99.130.. .
"John" <Jo**@nospam.infovis.co.uk> wrote in news:eSY4v5YqEHA.348
@TK2MSFTNGP15.phx.gbl:
Hi

How can I move from one aspx page to another programmatically?

Thanks


use response.redirect

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #4
"John" <Jo**@nospam.infovis.co.uk> wrote in
news:em**************@tk2msftngp13.phx.gbl:
If I use Response.Redirect("page2", false) to redirect to page 2 from
this page, how can I tell page 2 to return to this page when done?


On page 2, you use reponse.redirect back to the original page...

You may need to pass a variable to page1 to tell page1 that you've already
processed page2 and not to redirect again.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #5
What if several pages call page 2 for validation? Should I send the name of
the calling page in the call somehow or is there an automatic method to
determine the calling page?

Thanks

Regards
"Lucas Tam" <RE********@rogers.com> wrote in message
news:Xn**************************@140.99.99.130...
"John" <Jo**@nospam.infovis.co.uk> wrote in
news:em**************@tk2msftngp13.phx.gbl:
If I use Response.Redirect("page2", false) to redirect to page 2 from
this page, how can I tell page 2 to return to this page when done?


On page 2, you use reponse.redirect back to the original page...

You may need to pass a variable to page1 to tell page1 that you've already
processed page2 and not to redirect again.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/

Nov 18 '05 #6
"John" <Jo**@nospam.infovis.co.uk> wrote in
news:uN*************@TK2MSFTNGP11.phx.gbl:
What if several pages call page 2 for validation? Should I send the
name of the calling page in the call somehow or is there an automatic
method to determine the calling page?


You can use the server variable HTTP_REFERER to find out which page called
the current page.

However, if you're creating a page just for validation it may make more
sense to create a validation class rather than a validation page. With a
validation class, you can call it within a page's validation event without
redirecting.

--
Lucas Tam (RE********@rogers.com)
Please delete "REMOVE" from the e-mail address when replying.
http://members.ebay.com/aboutme/coolspot18/
Nov 18 '05 #7

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

Similar topics

10
by: headware | last post by:
I know that you can call the method of one from from inside another form by doing something like this Forms("MyForm").MyFunction(12, 34) However, you have to know that MyForm has a function...
14
by: ericellsworth | last post by:
Hi, I'm trying to use a class to pass variables back and forth from a form opened in dialog mode. I have created a class which invokes a form in its show method, like so: Public Sub Show() '...
2
by: mark | last post by:
I am developing an application in .Net C# that needs to restore a number of tool windows to some previous location and size. The problem I have is that when I create the form and set the Location...
2
by: Renzo | last post by:
hi ! i've recently begun developing in c# and i'd like to know what's the best way of calling a form from an already instanced form ? I have done a "Login" form which I run in the Main() using...
6
by: Amjad | last post by:
Hi, I want to make a project that calls and executes a function (VB code) made in a seperate file in the Application Folder. I know I can create the function in my project and call it internally,...
0
by: teddysnips | last post by:
I have Search form that allows users to retrieve records into a DataGrid. There are two search criteria - a Month and a Year, which are selected from drop-down lists. There is a server-side...
3
by: Opa | last post by:
Hi , I have a form with javasript which launches a popup via the showModalDialog() method. I get the dialog to open, now I am trying to first get a reference to the calling form from the popup...
7
by: Lee Crabtree | last post by:
I remember when I was first getting into .NET Forms programming that there was a rather emphatic rule about not constructing a form before calling Application.Run with it. So this: ...
1
by: SAL | last post by:
Hello, I'm developing this remoting app (.net 2.0) and I need to bring the server app's form to the front often. Since you can not do cross-thread communication on a form or control without using...
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:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
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: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
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
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
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...

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.