Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP General > ASP to HTML Component

Reply
Thread Tools

ASP to HTML Component

 
 
Tom Ticknor
Guest
Posts: n/a
 
      12-23-2003
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.
 
Reply With Quote
 
 
 
 
Ray at
Guest
Posts: n/a
 
      12-23-2003
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" <(E-Mail Removed)> wrote in message
news:031e01c3c8f1$04412e80$(E-Mail Removed)...
> 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.



 
Reply With Quote
 
 
 
 
Tom Ticknor
Guest
Posts: n/a
 
      12-23-2003
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 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" <(E-Mail Removed)>

wrote in message
>news:031e01c3c8f1$04412e80$(E-Mail Removed)...
>> 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.

>
>
>.
>

 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      12-23-2003

"Tom Ticknor" <(E-Mail Removed)> wrote in message
news:085e01c3c95d$151b2d70$(E-Mail Removed)...
> 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


 
Reply With Quote
 
Tom Ticknor
Guest
Posts: n/a
 
      12-23-2003
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 = "(E-Mail Removed)"
admissions_contact = "Donna Ticknor"
admissions_email = "(E-Mail Removed)"

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" <(E-Mail Removed)>

wrote in message
>news:085e01c3c95d$151b2d70$(E-Mail Removed)...
>> 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
>
>
>.
>

 
Reply With Quote
 
Tom Ticknor
Guest
Posts: n/a
 
      12-23-2003
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

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 = "(E-Mail Removed)"
>admissions_contact = "Donna Ticknor"
>admissions_email = "(E-Mail Removed)"
>
>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" <(E-Mail Removed)>

>wrote in message
>>news:085e01c3c95d$151b2d70$(E-Mail Removed)...
>>> 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
>>
>>
>>.
>>

>.
>

 
Reply With Quote
 
Ray at
Guest
Posts: n/a
 
      12-24-2003
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" <(E-Mail Removed)> wrote in message
news:09d801c3c972$998b6510$(E-Mail Removed)...
> 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 = "(E-Mail Removed)"
> admissions_contact = "Donna Ticknor"
> admissions_email = "(E-Mail Removed)"
>
> 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" <(E-Mail Removed)>

> wrote in message
> >news:085e01c3c95d$151b2d70$(E-Mail Removed)...
> >> 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
> >
> >
> >.
> >



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Is there any POP3 and NNTP component I can use as a ASP Component? Miguel Minora ASP General 1 01-11-2005 10:16 PM
asp.NET dll-component: server security hole ?? (managed component) nicholas ASP .Net 3 10-04-2004 11:44 AM
com+ component and Component Service Karuppasamy ASP .Net 1 01-14-2004 11:30 PM
com+ component and Component Service Karuppasamy ASP .Net 0 01-13-2004 06:09 PM
Re: Calling a .NET component from a COM component remotely Soni ASP .Net 0 07-25-2003 04:33 AM



Advertisments