By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
446,364 Members | 1,518 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 446,364 IT Pros & Developers. It's quick & easy.

ASP to HTML Component

P: n/a
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
Share this Question
Share on Google+
6 Replies


P: n/a
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

P: n/a
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

P: n/a

"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

P: n/a
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

P: n/a
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

P: n/a
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 discussion thread is closed

Replies have been disabled for this discussion.