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

how to execute and capture .aspx output

Is there a way for a web form to invoke an .aspx page and get its output
using the framework? I suppose i can create a client app and execute the url
but I'm thinking there must be a way to do it with the framework.

thanks,

john
Jan 11 '06 #1
2 3619
Yes, you can use the WebResponse and WebRequest classes in the framework to
request the ASPX page and then capture the HTML output from the Response's
output stream. I don't have the code in front of me, but I can dig it up if
you need it.

Paul
"John Mott" wrote:
Is there a way for a web form to invoke an .aspx page and get its output
using the framework? I suppose i can create a client app and execute the url
but I'm thinking there must be a way to do it with the framework.

thanks,

john

Jan 11 '06 #2
Dim webReq as WebRequest
Dim webResp as WebResponse
Dim srResp as StreamReader

webReq = webReq.Create("http://some.url.com/somepage.aspx")
webResp = webReq.GetResponse()
srResp = New StreamReader(webResp.GetResponseStream())

Dim htmlOutput as String = srResp.ReadToEnd()

"John Mott" wrote:
Is there a way for a web form to invoke an .aspx page and get its output
using the framework? I suppose i can create a client app and execute the url
but I'm thinking there must be a way to do it with the framework.

thanks,

john

Jan 11 '06 #3

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

Similar topics

0
by: bbenham | last post by:
In the Code-Behind file for a Specific page I'm doing, I am using Server.Execute("anotherpage.aspx", writer) to retrieve the resulting output of a different aspx page, which I am maniuplating etc. A...
2
by: Rich Tasker | last post by:
My goal is to execute a DTS package that calls multiple child DTS packages from a C# (2003) app and display the progress of the entire process to the user. I have followed the model defined in...
3
by: Ben | last post by:
Hiyo I want to perform a programmatic server-side include, and I think that the best way would be to use Server.Execute(path, optional textwriter). Certainly ommitting the textwriter means that...
2
by: nick | last post by:
Hi, I wondering if it is possible in asp.net to somehow execute a string of code as if it were a page on the server. That is to say, if I executed the following code which resided in an aspx...
2
by: Dune | last post by:
I'm trying to execute an aspx page by calling Server.Execute. The aspx page I'm trying to execute is in a different web app from the aspx page containing the Server.Execute statement. A slightly...
0
by: Jon Paal | last post by:
To produce 1 dynamic chart, I add a control to my aspx page positioned in a placeholder. I need to have more than one chart and need to capture the chart control output so it can be complemented...
4
by: George Lake | last post by:
Hi, How can I capture the text output of a console app? For example, I would like to capture the outpur of "qwinsta" Thanks.
3
by: teddysnips | last post by:
I'm trying to use the SPROC below (courtesy of Erland!) to capture the error message but it fails owing to insufficient permissions (I can't reproduce it just now, but I think it's because it can't...
0
by: Elroyskimms | last post by:
I need to execute a batch file via ASP.Net. In my VB.Net code, I'm using System.Diagnostics.Process to call the batch file and its appropriate command line arguments. I'm using...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
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...
0
by: ryjfgjl | last post by:
In our work, we often need to import Excel data into databases (such as MySQL, SQL Server, Oracle) for data analysis and processing. Usually, we use database tools like Navicat or the Excel import...
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: 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...

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.