ASP to HTML Component

Discussion in 'ASP General' started by Tom Ticknor, Dec 23, 2003.

  1. Tom Ticknor

    Tom Ticknor Guest

    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.
    Tom Ticknor, Dec 23, 2003
    #1
    1. Advertising

  2. Tom Ticknor

    Ray at Guest

    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" <> wrote in message
    news:031e01c3c8f1$04412e80$...
    > 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.
    Ray at, Dec 23, 2003
    #2
    1. Advertising

  3. Tom Ticknor

    Tom Ticknor Guest

    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" <>

    wrote in message
    >news:031e01c3c8f1$04412e80$...
    >> 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.

    >
    >
    >.
    >
    Tom Ticknor, Dec 23, 2003
    #3
  4. Tom Ticknor

    Ray at Guest

    "Tom Ticknor" <> wrote in message
    news:085e01c3c95d$151b2d70$...
    > 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
    Ray at, Dec 23, 2003
    #4
  5. Tom Ticknor

    Tom Ticknor Guest

    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 = ""
    admissions_contact = "Donna Ticknor"
    admissions_email = ""

    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" <>

    wrote in message
    >news:085e01c3c95d$151b2d70$...
    >> 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
    >
    >
    >.
    >
    Tom Ticknor, Dec 23, 2003
    #5
  6. Tom Ticknor

    Tom Ticknor Guest

    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 = ""
    >admissions_contact = "Donna Ticknor"
    >admissions_email = ""
    >
    >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" <>

    >wrote in message
    >>news:085e01c3c95d$151b2d70$...
    >>> 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
    >>
    >>
    >>.
    >>

    >.
    >
    Tom Ticknor, Dec 23, 2003
    #6
  7. Tom Ticknor

    Ray at Guest

    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" <> wrote in message
    news:09d801c3c972$998b6510$...
    > 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 = ""
    > admissions_contact = "Donna Ticknor"
    > admissions_email = ""
    >
    > 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" <>

    > wrote in message
    > >news:085e01c3c95d$151b2d70$...
    > >> 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
    > >
    > >
    > >.
    > >
    Ray at, Dec 24, 2003
    #7
    1. Advertising

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Soni
    Replies:
    0
    Views:
    1,080
  2. Karuppasamy

    com+ component and Component Service

    Karuppasamy, Jan 13, 2004, in forum: ASP .Net
    Replies:
    0
    Views:
    604
    Karuppasamy
    Jan 13, 2004
  3. Karuppasamy

    com+ component and Component Service

    Karuppasamy, Jan 13, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    2,515
  4. nicholas
    Replies:
    3
    Views:
    834
    nicholas
    Oct 4, 2004
  5. Miguel Minora
    Replies:
    1
    Views:
    149
    Miguel Minora
    Jan 11, 2005
Loading...

Share This Page