473,399 Members | 4,177 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,399 software developers and data experts.

Initiating a new Request mid-page?

I have a situation where I am migrating some ASP pages to ASP.NET. A
particular page that I have migrated #includes another ASP page that is
not going to be migrated. This is unforunate because it causes the two
pages to be "mixed" together, resulting in a part of the page that
needs to be processed with the ASP filter, and another part that needs
to be processed by ASP.NET.

Is there a way that I can initiate a new server request during the
ASP.NET processing, obtain the HTML result of the new request (using
the ASP page), and then render that result into the original ASP.NET
request?

I've heard of 3rd party "bridge" software that can do this, but that is
really not an option with my project. I'm hoping there is a fairly
simple way to do it, otherwise I will have to convert all of the ASP to
ASP.NET.

Nov 19 '05 #1
1 838
You can use System.Net.HttpWebRequest or System.Net.WebClient to access
the ASP page.
Here is code snippet

private string GetContent(string url)
{
HttpWebRequest oReq = (HttpWebRequest)HttpWebRequest.Create(url);

HttpWebResponse oResponse = (HttpWebResponse)oReq.GetResponse();
StreamReader sr = new StreamReader(oResponse.GetResponseStream());
string content = sr.ReadToEnd();
sr.Close();
return content;

}

Nov 19 '05 #2

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

Similar topics

4
by: Gerhard Pretorius | last post by:
ON Win 2003 IIS6, Since yesterday, (12 Aug 2003) for some strange reason, (after installing WindowsServer2003-KB823980-x86-ENU.exe) I cannot pass the Request object to to VB COM DLL. I have...
10
by: Ken VdB | last post by:
Hi everyone, Is there a reason why the Mid() function only works in one direction in VBScript? This code works in VB6 but not in VBScript? Is there a way around it? I am trying to create an...
6
by: Nawab | last post by:
Hey can anyone explain to me the difference between Mid and Mid$ ....i notice sometimes when i a running the update query with Mid$ it tells me that for example 3 records will be updated ( which in...
14
by: Drew | last post by:
I need to iterate through a submitted form, inserting data on each pass. In the past, I have always used form elements that were named with numbers at the end, like this, name1 relationship1...
2
by: John | last post by:
Hello, We are trying to implement a solution for a project requirement for which we need to have multiple services running to support offline functionality such as the transmission of emails to...
7
by: eric.goforth | last post by:
Hello, I'm working with a classic asp page that calls another classic asp page. The html in my calling page looks like: <form method="post"...
4
by: Michael Kujawa | last post by:
I am using the following to create an SQL statement using the names and values from request.form. The loop goes through each item in request.form The issue comes in having an additional "and" at...
0
by: AmyHanson | last post by:
I am new to mobile development and am having some trouble sources for the tasks I need to perform. I have been looking around and I can find plenty of information on copying the file initiating on...
2
by: =?Utf-8?B?U2Fs?= | last post by:
<I MOVED THIS POST TO ITS OWN THREAD. ORIGINAL POST FOUND HERE:...
3
by: empiresolutions | last post by:
i am using the following AJAX request method. Most of you probably use this script allready as it seems to be everywhere online. I use it often with out issue... until now. What I'm finding is...
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
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
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
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
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...

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.