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

ASP to HTML Component

I am creating a page dynamically in ASP by gathering data
from a database. I wish to email the resulting page to
my user group by using the CDOSYS HTMLbody. The problem
is I don't know how to capture the dynamically created
page and save as a static html page so I can read it to
create the HTMLbody for my email.

I really need a solution to this problem.
Jul 19 '05 #1
6 2214
Take a look at this article and think of your server as the remote site.
http://www.aspfaq.com/show.asp?id=2173 Be aware that any relative paths to
images will have to be fully qualified using something along the lines of
sBody = Replace(sBody, "<img src=""/images", "<img
src="http://www.yoursite.com/images")

Ray at home

"Tom Ticknor" <an*******@discussions.microsoft.com> wrote in message
news:03****************************@phx.gbl...
I am creating a page dynamically in ASP by gathering data
from a database. I wish to email the resulting page to
my user group by using the CDOSYS HTMLbody. The problem
is I don't know how to capture the dynamically created
page and save as a static html page so I can read it to
create the HTMLbody for my email.

I really need a solution to this problem.

Jul 19 '05 #2
The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.
Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute
the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the

xmlhttp.send ""

on it.
-----Original Message-----
Take a look at this article and think of your server as the remote site.http://www.aspfaq.com/show.asp?id=2173 Be aware that any relative paths toimages will have to be fully qualified using something along the lines ofsBody = Replace(sBody, "<img src=""/images", "<img
src="http://www.yoursite.com/images")

Ray at home

"Tom Ticknor" <an*******@discussions.microsoft.com> wrote in messagenews:03****************************@phx.gbl...
I am creating a page dynamically in ASP by gathering data from a database. I wish to email the resulting page to
my user group by using the CDOSYS HTMLbody. The problem is I don't know how to capture the dynamically created
page and save as a static html page so I can read it to
create the HTMLbody for my email.

I really need a solution to this problem.

.

Jul 19 '05 #3

"Tom Ticknor" <an*******@discussions.microsoft.com> wrote in message
news:08****************************@phx.gbl...
The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.
It doesn't matter if the remote page is an asp page or anything else.

Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute
the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the

xmlhttp.send ""

on it.


Post your code.

Ray at work
Jul 19 '05 #4
I think I may have a possible cause of why I can't get it
to work. I use SESSION variables in the page I am trying
to GET and that seems to trigger the error. Same exact
code below once with the session and once without. With
session it errors, without session it works. Does this
make sense? Simple sample code below:

<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<%
Dim family_id, tech_contact, tech_email,
admissions_contact, admissions_email
Dim school_id, school_logo, school_inputlogo
Dim body_bgcolor, body_textcolor, inputtable_bgcolor,
inputtable_bordercolor, inputtable_fontcolor

' if I switch the two lines below it changes whether it
works or not.

'tech_contact = "Tom Ticknor"
tech_contact = session("school_parms")(11)
tech_email = "to*@ticknor.com"
admissions_contact = "Donna Ticknor"
admissions_email = "do***@ticknor.com"

school_id = "1000"
school_inputlogo=""
body_background=""

body_bgcolor = "#FFFFFF"
body_textcolor = "#000000"
inputtable_bgcolor = "#FFFFFF"
inputtable_bordercolor = "#000000"
inputtable_fontcolor = "#000000"

family_id = "tomtest"
%>
<body bgcolor="<%=body_bgcolor%>" text="<%=body_textcolor%
"
<%
IF body_background<>"" THEN response.write "
background="& body_background
%>
<%
IF school_inputlogo<>"" THEN response.write "<p
align='center'><img border='0' src='" &
school_inputlogo&"'></p>"
%>

<div align="center">
<table width="600" border="0" cellspacing="0"
cellpadding="6">
<tr>
<td width="300"><strong><font face="Arial,
Helvetica, sans-serif">Family</font></strong><font
size="3" face="Arial, Helvetica, sans-serif"><strong>
ID: <font color="<%=inputtable_fontcolor%>"><%
=family_id%></font></strong></font></td>
<td width="300"><div align="right"><font size="3"
face="Arial, Helvetica, sans-
serif"><strong></strong></font></div></td>
</tr>
</table>
<br>
</div>
<div align="center">
<table width="600" border="2" cellspacing="0"
cellpadding="2" bordercolor="<%=inputtable_bordercolor%>"
style="border-collapse: collapse">
<tr>
<td> <table width="600" border="0" cellspacing="0"
cellpadding="6" bgcolor="<%=tableinput_bgcolor%>">
<tr bgcolor="<%=inputtable_bgcolor%>">
<td width="600"><div align="center">
<p><font size="4" face="Arial, Helvetica,
sans-serif"><strong><font color="<%=inputtable_fontcolor%" size="5">Thank You!!!</font></strong></font></p>
<p><font color="<%=inputtable_fontcolor%" size="4" face="Arial, Helvetica, sans-serif"><br> Remember to update your profile
regularly with current
information.</font></p>
<p><font color="<%=inputtable_fontcolor%" size="4" face="Arial, Helvetica, sans- serif"><strong><font size="3">Technical
questions:</font></strong> <font
size="3">
<a href="mailto:<%=tech_email%>"><%
=tech_contact%></a><br>
<strong>Admissions questions:</strong>
<a href="mailto:<%=admissions_email%>"><%
=admissions_contact%></a></font></font></p>
<p><font size="3" face="Arial, Helvetica,
sans-serif"><br>
</font>
<input type="button" value="Exit"
name="exit" onclick="self.close()"></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>

</html>
-----Original Message-----

"Tom Ticknor" <an*******@discussions.microsoft.com> wrote in messagenews:08****************************@phx.gbl...
The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.
It doesn't matter if the remote page is an asp page or

anything else.
Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the
xmlhttp.send ""

on it.


Post your code.

Ray at work
.

Jul 19 '05 #5
In fact, it seems as though anything that is moderately
difficult like accessing a database doesn't work.
-----Original Message-----
I think I may have a possible cause of why I can't get itto work. I use SESSION variables in the page I am tryingto GET and that seems to trigger the error. Same exact
code below once with the session and once without. With
session it errors, without session it works. Does this
make sense? Simple sample code below:

<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<%
Dim family_id, tech_contact, tech_email,
admissions_contact, admissions_email
Dim school_id, school_logo, school_inputlogo
Dim body_bgcolor, body_textcolor, inputtable_bgcolor,
inputtable_bordercolor, inputtable_fontcolor

' if I switch the two lines below it changes whether it
works or not.

'tech_contact = "Tom Ticknor"
tech_contact = session("school_parms")(11)
tech_email = "to*@ticknor.com"
admissions_contact = "Donna Ticknor"
admissions_email = "do***@ticknor.com"

school_id = "1000"
school_inputlogo=""
body_background=""

body_bgcolor = "#FFFFFF"
body_textcolor = "#000000"
inputtable_bgcolor = "#FFFFFF"
inputtable_bordercolor = "#000000"
inputtable_fontcolor = "#000000"

family_id = "tomtest"
%>
<body bgcolor="<%=body_bgcolor%>" text="<% =body_textcolor%
"


<%
IF body_background<>"" THEN response.write "
background="& body_background
%>


<%
IF school_inputlogo<>"" THEN response.write "<p
align='center'><img border='0' src='" &
school_inputlogo&"'></p>"
%>

<div align="center">
<table width="600" border="0" cellspacing="0"
cellpadding="6">
<tr>
<td width="300"><strong><font face="Arial,
Helvetica, sans-serif">Family</font></strong><font
size="3" face="Arial, Helvetica, sans-serif"><strong>
ID: <font color="<%=inputtable_fontcolor%>"><%
=family_id%></font></strong></font></td>
<td width="300"><div align="right"><font size="3"
face="Arial, Helvetica, sans-
serif"><strong></strong></font></div></td>
</tr>
</table>
<br>
</div>
<div align="center">
<table width="600" border="2" cellspacing="0"
cellpadding="2" bordercolor="<%=inputtable_bordercolor%
"
style="border-collapse: collapse">
<tr>
<td> <table width="600" border="0" cellspacing="0"
cellpadding="6" bgcolor="<%=tableinput_bgcolor%>">
<tr bgcolor="<%=inputtable_bgcolor%>">
<td width="600"><div align="center">
<p><font size="4" face="Arial,

Helvetica,sans-serif"><strong><font color="<%=inputtable_fontcolor%
" size="5">Thank You!!!</font></strong></font></p>
<p><font color="<%=inputtable_fontcolor%
" size="4" face="Arial, Helvetica, sans-serif"><br>

Remember to update your profile
regularly with current
information.</font></p>
<p><font color="<%=inputtable_fontcolor%
" size="4" face="Arial, Helvetica, sans-

serif"><strong><font size="3">Technical
questions:</font></strong> <font
size="3">
<a href="mailto:<%=tech_email%>"><%
=tech_contact%></a><br>
<strong>Admissions questions:</strong>
<a href="mailto:<%=admissions_email%>"><%
=admissions_contact%></a></font></font></p>
<p><font size="3" face="Arial,

Helvetica,sans-serif"><br>
</font>
<input type="button" value="Exit"
name="exit" onclick="self.close()"></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>

</html>
-----Original Message-----

"Tom Ticknor" <an*******@discussions.microsoft.com>

wrote in message
news:08****************************@phx.gbl...
The procedure outlined at the site you provided does an excellent job with static HTML pages. What I need is a procedure to do basically the same thing with an ASP
page.


It doesn't matter if the remote page is an asp page or

anything else.

Following the examples at the aspfaq site if I create a simple html page it works but if I take that same page, make it an asp page (nothing else different) andexecute the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line withthe
xmlhttp.send ""

on it.


Post your code.

Ray at work
.

.

Jul 19 '05 #6
The session variables will be empty, unless you're assigning them in
global.asa or something. The server is making the http request to the site
(which just happens to be this same server and site), so it will be a
totally different session from the one that the user loading this page you
posted is.

Ray at work

"Tom Ticknor" <an*******@discussions.microsoft.com> wrote in message
news:09****************************@phx.gbl...
I think I may have a possible cause of why I can't get it
to work. I use SESSION variables in the page I am trying
to GET and that seems to trigger the error. Same exact
code below once with the session and once without. With
session it errors, without session it works. Does this
make sense? Simple sample code below:

<html>
<head>
<title>Test</title>
<meta http-equiv="Content-Type" content="text/html;
charset=iso-8859-1">
</head>
<%
Dim family_id, tech_contact, tech_email,
admissions_contact, admissions_email
Dim school_id, school_logo, school_inputlogo
Dim body_bgcolor, body_textcolor, inputtable_bgcolor,
inputtable_bordercolor, inputtable_fontcolor

' if I switch the two lines below it changes whether it
works or not.

'tech_contact = "Tom Ticknor"
tech_contact = session("school_parms")(11)
tech_email = "to*@ticknor.com"
admissions_contact = "Donna Ticknor"
admissions_email = "do***@ticknor.com"

school_id = "1000"
school_inputlogo=""
body_background=""

body_bgcolor = "#FFFFFF"
body_textcolor = "#000000"
inputtable_bgcolor = "#FFFFFF"
inputtable_bordercolor = "#000000"
inputtable_fontcolor = "#000000"

family_id = "tomtest"
%>
<body bgcolor="<%=body_bgcolor%>" text="<%=body_textcolor%
"


<%
IF body_background<>"" THEN response.write "
background="& body_background
%>


<%
IF school_inputlogo<>"" THEN response.write "<p
align='center'><img border='0' src='" &
school_inputlogo&"'></p>"
%>

<div align="center">
<table width="600" border="0" cellspacing="0"
cellpadding="6">
<tr>
<td width="300"><strong><font face="Arial,
Helvetica, sans-serif">Family</font></strong><font
size="3" face="Arial, Helvetica, sans-serif"><strong>
ID: <font color="<%=inputtable_fontcolor%>"><%
=family_id%></font></strong></font></td>
<td width="300"><div align="right"><font size="3"
face="Arial, Helvetica, sans-
serif"><strong></strong></font></div></td>
</tr>
</table>
<br>
</div>
<div align="center">
<table width="600" border="2" cellspacing="0"
cellpadding="2" bordercolor="<%=inputtable_bordercolor%>"
style="border-collapse: collapse">
<tr>
<td> <table width="600" border="0" cellspacing="0"
cellpadding="6" bgcolor="<%=tableinput_bgcolor%>">
<tr bgcolor="<%=inputtable_bgcolor%>">
<td width="600"><div align="center">
<p><font size="4" face="Arial, Helvetica,
sans-serif"><strong><font color="<%=inputtable_fontcolor%
" size="5">Thank

You!!!</font></strong></font></p>
<p><font color="<%=inputtable_fontcolor%
" size="4" face="Arial, Helvetica, sans-serif"><br>

Remember to update your profile
regularly with current
information.</font></p>
<p><font color="<%=inputtable_fontcolor%
" size="4" face="Arial, Helvetica, sans-

serif"><strong><font size="3">Technical
questions:</font></strong> <font
size="3">
<a href="mailto:<%=tech_email%>"><%
=tech_contact%></a><br>
<strong>Admissions questions:</strong>
<a href="mailto:<%=admissions_email%>"><%
=admissions_contact%></a></font></font></p>
<p><font size="3" face="Arial, Helvetica,
sans-serif"><br>
</font>
<input type="button" value="Exit"
name="exit" onclick="self.close()"></p>
</div></td>
</tr>
</table></td>
</tr>
</table>
</div>
</body>

</html>
-----Original Message-----

"Tom Ticknor" <an*******@discussions.microsoft.com>

wrote in message
news:08****************************@phx.gbl...
The procedure outlined at the site you provided does an
excellent job with static HTML pages. What I need is a
procedure to do basically the same thing with an ASP
page.


It doesn't matter if the remote page is an asp page or

anything else.

Following the examples at the aspfaq site if I create a
simple html page it works but if I take that same page,
make it an asp page (nothing else different) and execute the code I get the following error:

maxml3.dll error '80004005'

Unspecified error

and lists the ASP line number which is the line with the
xmlhttp.send ""

on it.


Post your code.

Ray at work
.

Jul 19 '05 #7

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

Similar topics

0
by: Nunya D. Bidness | last post by:
If anyone is interested in testing these components goto http://www.vibrantinnovations.com/vibrantlayouttools.asp The Vibrant Layout Tools ActiveX component is a suite of tools that allow...
5
by: skol | last post by:
Is there any HTML WYSIWYG editor component available for Python/wxPython? Thanks.
0
by: Chad | last post by:
I have COM component embedded on html page. It has version 1.0.0.1 (by default). I have converted it in cab file. Code of html is something like: <HTML><HEAD></HEAD><BODY><OBJECT...
3
by: Andy Smith | last post by:
Hi, I need to convert HTML files to PDF using a .net component. I've seen components that do this but they all are either com wrappers on activex controls, or print to a 'Convert to PDF' printer. ...
15
by: WStoreyII | last post by:
I dont think that it really matters, but just for my own reference? I found a calendar component tutorial online for html components. in this component the tag for a script was <SCRIPT...
2
by: dchadha | last post by:
Hi, I need to convert HTML (online or offline) to PDF in C# application. In addition I want to merge PDF documents also on the fly. I am looking for C# / VB.NET code or a .NET component which...
6
by: Just D. | last post by:
Does anybody know if there any open source project written in C# as a class library allowing to convert RTF string into HTML string? I'd like to join this project for the interest of both sides. I...
8
by: =?Utf-8?B?U2hhd24gUmFtaXJleg==?= | last post by:
I am coming at the world from the standpoint of a veteran ASP Classic developer. I am not clear on the advantages of using the ASP.NET control over standard HTML control. With the ASP.NET...
2
by: Number 11950 - GPEMC! Replace number with 11950 | last post by:
HTML to RTF conversion is done by the clipboard in certain circumstances. Does anyone know of an API or possibly a Framework2 class.method that will convert HTML to RTF...? TIA -- Timothy...
0
by: =?Utf-8?B?Q29kZVJhem9y?= | last post by:
Hi, Is it possible to access an htc file from the windows webbrowser control? I am receiving the following error: "An error has occurred in the script on this page." "Error: Access is denied...
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: taylorcarr | last post by:
A Canon printer is a smart device known for being advanced, efficient, and reliable. It is designed for home, office, and hybrid workspace use and can also be used for a variety of purposes. However,...
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: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
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...

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.