473,796 Members | 2,740 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Grab HTML

I'm looking for a way to grab the HTML behind one of my pages and display it
to the user. The page I'm trying to get the HTML from is an ASP page, so
obviously I'm looking for the post-asp processing results. Basically I want
the same HTML that the user could get if they had done a "View Source" in
their browser on the page.

Does IIS/ASP provide a way to do this natively, or do I have to buy a third
party component?

TIA
David


Jul 19 '05 #1
2 5636
David Taylor wrote:
I'm looking for a way to grab the HTML behind one of my pages and
display it to the user. The page I'm trying to get the HTML from is
an ASP page, so obviously I'm looking for the post-asp processing
results. Basically I want the same HTML that the user could get if
they had done a "View Source" in their browser on the page.

Does IIS/ASP provide a way to do this natively, or do I have to buy a
third party component?

TIA
David


http://www.aspfaq.com/show.asp?id=2173

HTH,
Bob Barrows

--
Microsoft MVP - ASP/ASP.NET
Please reply to the newsgroup. This email account is my spam trap so I
don't check it very often. If you must reply off-line, then remove the
"NO SPAM"
Jul 19 '05 #2
David Taylor wrote on 23 nov 2003 in
microsoft.publi c.inetserver.as p.general:
I'm looking for a way to grab the HTML behind one of my pages and
display it to the user. The page I'm trying to get the HTML from is
an ASP page, so obviously I'm looking for the post-asp processing
results. Basically I want the same HTML that the user could get if
they had done a "View Source" in their browser on the page.

Does IIS/ASP provide a way to do this natively, or do I have to buy a
third party component?


<%

url = "http://www.mysite.org/mypage.asp"
' must be an external reference !

set xmlhttp = server.CreateOb ject("MSXML2.Se rverXMLHTTP")
xmlhttp.open "GET", url, false
xmlhttp.send ""

t=xmlhttp.Respo nseText

' make a source displaying page
t=replace(t,"<" ,"&lt;")
t=replace(t,VbC rLf,"<br>")

response.write t

set xmlhttp = nothing

%>
--
Evertjan.
The Netherlands.
(Please change the x'es to dots in my emailaddress)
Jul 19 '05 #3

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

Similar topics

3
7986
by: dan glenn | last post by:
hi. I want to code a 'preview' function into a guestbook entry page. I can do it with a button that posts, bringing up a whole new page showing a preview of what has been entered, and then the user could hit a 'return to entry form' button or some-such and go back to the form. But what I want to do instead is just use an HTML link with some javascript to grab the form's textarea value, and open another browser window that uses a php file...
0
2718
by: Baby Blue | last post by:
I have 2 code like below to grab a news website for my site. However, when I click some links (such as : http://wwww.vnexpress.net/xxx/xxxx ) inside the site which I want to grab, it has some errors. Can any body help me ?? Demo : news.thuthao.info The real website : vnexpress.net ---------------------------index.php------------------------------- <?php
8
3467
by: gregory_may | last post by:
Is there a way to grab a "Screen Shot" that includes "Tool Tips"? I saw this code someplace, cant remember where. But it doesnt grab "Tool Tips". Is there a better way to do this in .net? Thanks! Private Declare Function CreateDC Lib "gdi32" Alias "CreateDCA" (ByVal lpDriverName As String, ByVal lpDeviceName As String, ByVal lpOutput As String, ByVal lpInitData As String) As Integer
1
1376
by: werdna.sivad | last post by:
In PHP is there a way to grab the HTTP Pipeline? I want to be able to grab all the HTML code that gets streamed to the user. I want to add the ability to send copies of a page as an email attachment. The pages are already built and working, so it would be nice to not have to duplicate code that already exists. Can I just have it grab what it sends to the user and then save that into a file? Do you understand what I'm asking for?
3
4561
by: James | last post by:
Hi guys, I have been building a search engine here - not because I have plans of dethrowning Google but as a simple app upon which to develop a function set that I can use for other things. So I coded my little search engine, uploaded it and it didn't work with my host (Dreamhost.com): Warning: fopen(): URL file-access is disabled in the server
8
9421
by: '69 Camaro | last post by:
Perhaps I'm Googling for the wrong terms. Does anyone have links to examples of the syntax necessary to read the HTML on another Web page when that HTML is produced from JavaScript using the document.write( ) method? For a simplified example, I have two Web pages. Page 1 uses JavaScript with the following: htmlData = "<B>This is bold text.</B>"; document.write(htmlData);
3
3536
by: Darrel | last post by:
using Request.FilePath will return the entire file path: directory/directory/myfile.aspx Is there a built function in ASP.net to grab just the filename (myfile.aspx) or do I need to write some string manipulation functions to grab it out of the filepath? -Darrel
5
2894
by: =?Utf-8?B?U29waGll?= | last post by:
Hi, I try to design a window application to grab attachment from a list of given URL and save them to a user difined folder on their local drive. The list of URL for me to grab attachment will be saved in text file format. The URL's might be ending with attachment file types: .jpg, .gif, pdf...also, they might be just an ASP page. I would like to have number of downloaded attachment displayed on the form while the program is...
2
1952
by: kazi | last post by:
Hi all I need to know, how to grab html data using perl code? we have a two web server. Now I need to grab the one perticular page data and put the data in a table. Please help me how to do this. Kazi
0
9535
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 effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10467
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, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10244
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 tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
1
10201
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 Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For most users, this new feature is actually very convenient. If you want to control the update process,...
1
7558
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 presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
5582
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4130
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
2
3744
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2931
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.