473,398 Members | 2,525 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,398 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 4840
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: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
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?
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
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
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...

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.