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

include asp page in webform

I'm trying to migrate a page as quickly as possible from
asp to asp .net and was wondering if there is any way to
include an asp page in an aspx page? Basically, I'd like
to be able to do something equivalent to "<!-- #include
file="SomeFile.asp" -->" in a webform.

cheers :)
Jul 21 '05 #1
1 4838
It is possible to "call" external web pages from asp.net, regardless of
whether those pages are in ASP.NET, PHP, CFM, JSP, ASP, or whatever. It's
all just
HTTP.

If the returned web page is formatted as XML, you can then parse the XML (or
deserialize it).
if it is HTML, you can display it or parse it,
etc.

It's up to you.

for a GET, you would do something like this:
string urlspec= "http://www.google.com";
System.Net.WebRequest req= System.Net.WebRequest.Create(urlspec);
System.IO.StreamReader sr = new
System.IO.StreamReader(req.GetResponse().GetRespon seStream());
result= sr.ReadToEnd ();

The result would then hold the raw HTML. If you wanted to invoke a local
page, you could use http://localhost/aspdir/whatever.asp as your urlspec.

For a POST the code is somewhat different but the principle is the same.

--
Dino Chiesa
Microsoft Developer Division
d i n o c h @ o n l i n e . m i c r o s o f t . c o m
"Dune" <Du**@paradise.co.nz> wrote in message
news:0b****************************@phx.gbl...
I'm trying to migrate a page as quickly as possible from
asp to asp .net and was wondering if there is any way to
include an asp page in an aspx page? Basically, I'd like
to be able to do something equivalent to "<!-- #include
file="SomeFile.asp" -->" in a webform.

cheers :)

Jul 21 '05 #2

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

Similar topics

3
by: Quentin | last post by:
Hey there ! I made my own WebControl, that inherits from WebControls, and i added an HtmlTable to it. I would like to include a file, dynamically, to one of its cells... I've already searched,...
6
by: dave | last post by:
I have a webform with many checkboxes on it. I want the user to be able click on a button and the page be posted to another webform so that I can capture which checkboxes were selected. For all...
4
by: Keith Chadwick | last post by:
I have several small pieces of common code that get applied to each page. Which is better a better way of including them in other pages? Use the traditional include statement or go with the...
4
by: Andrea Williams | last post by:
I'm trying to set up a user control and change some values from the aspx page, but I keep running into trouble. What I really would like to do is be able to set a Label.Text in the user control...
5
by: Benjamin Bittner | last post by:
Hi all I have a to different input masks on one page. The first must be posted on itself, the second must be posted to another website and popup in a new window. My problem is, ive got one global...
6
by: Skeptical | last post by:
Hello, I am trying to embed html output into my webform but could not figure out how to so far. The form will execute a Perl script with some parameters, and script will output some html...
5
by: NuB | last post by:
i have an classic asp web app that I'm converting to .NET using C#. The asp app uses about 20 include files on various pages, in the .NET world can i use include files or is it web user controls,...
1
by: Dune | last post by:
I'm trying to migrate a page as quickly as possible from asp to asp .net and was wondering if there is any way to include an asp page in an aspx page? Basically, I'd like to be able to do...
4
by: Goran Djuranovic | last post by:
Hi all, I am experiencing a strange thing happening with a "designer.vb" page. Controls I manually declare in this page are automatically deleted after I drop another control on a ".aspx" page. -...
0
by: aa123db | last post by:
Variable and constants Use var or let for variables and const fror constants. Var foo ='bar'; Let foo ='bar';const baz ='bar'; Functions function $name$ ($parameters$) { } ...
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
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...
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:
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...

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.