Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. Web Development
  3. ASP.NET
  4. Emailing html page

Emailing html page

Scheduled Pinned Locked Moved ASP.NET
htmlcom
3 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • E Offline
    E Offline
    Ersan Ercek
    wrote on last edited by
    #1

    Dear All, I would like to send emails to the clients in accordance with their choice (shopping), I would like it to be formatted, so I thought of HTML body however, it seems difficult to convert gridview datasource to HTML, Is there any easy way to reach the HTML source of a page and assign it to an HTML Text. Thanks alot. Below you may see a samle page to be sent. <table style="margin-left:auto; margin-right:auto; position:relative;"> <tr> <td> <div id="centrallarge"> <h1 style="height:85px; width:900px;"><img src='http://www.salatabufesi.com/images/SalataPage.jpg' alt="Salata"/> </h1> <h1 style="height:45px; width:900px;"><img src='http://www.salatabufesi.com/images/SalataBufesi.jpg' alt="Salata Büfesi"/> </h1> </div> </td> </tr> <tr> <td> <div id="central" style="height:400px; margin-top:30px;"> <table id="Tablo" style="margin-left:auto; margin-right:auto; position:relative;"> <tr id="Satir1" style="height:25px; vertical-align:top;"> <td width="901" id="Sutun1"> <span id="lblAciklama" style="color:Red;font-family:Tahoma;">Siparişiniz elimize ulaşmıştır</span> </td> </tr> <tr style="height:25px; vertical-align:top;"> <td> <span id="lblOnMusteri" style="color:Red;font-family:Tahoma;">Sipariş Adresi: </span> <span id="lblMusteri" style="font-family:Tahoma;">İstasyon Cad Nuriye Hnm Apt No:17/14 .</span> </td> </tr> <tr style="height:25px; vertical-align:top;"> <td> <span id="lblOnOdeme" style="color:Red;font-family:Tahoma;">Ödeme Şekli: </span>

    G 1 Reply Last reply
    0
    • E Ersan Ercek

      Dear All, I would like to send emails to the clients in accordance with their choice (shopping), I would like it to be formatted, so I thought of HTML body however, it seems difficult to convert gridview datasource to HTML, Is there any easy way to reach the HTML source of a page and assign it to an HTML Text. Thanks alot. Below you may see a samle page to be sent. <table style="margin-left:auto; margin-right:auto; position:relative;"> <tr> <td> <div id="centrallarge"> <h1 style="height:85px; width:900px;"><img src='http://www.salatabufesi.com/images/SalataPage.jpg' alt="Salata"/> </h1> <h1 style="height:45px; width:900px;"><img src='http://www.salatabufesi.com/images/SalataBufesi.jpg' alt="Salata Büfesi"/> </h1> </div> </td> </tr> <tr> <td> <div id="central" style="height:400px; margin-top:30px;"> <table id="Tablo" style="margin-left:auto; margin-right:auto; position:relative;"> <tr id="Satir1" style="height:25px; vertical-align:top;"> <td width="901" id="Sutun1"> <span id="lblAciklama" style="color:Red;font-family:Tahoma;">Siparişiniz elimize ulaşmıştır</span> </td> </tr> <tr style="height:25px; vertical-align:top;"> <td> <span id="lblOnMusteri" style="color:Red;font-family:Tahoma;">Sipariş Adresi: </span> <span id="lblMusteri" style="font-family:Tahoma;">İstasyon Cad Nuriye Hnm Apt No:17/14 .</span> </td> </tr> <tr style="height:25px; vertical-align:top;"> <td> <span id="lblOnOdeme" style="color:Red;font-family:Tahoma;">Ödeme Şekli: </span>

      G Offline
      G Offline
      Gamzun
      wrote on last edited by
      #2

      System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); GridView1.RenderControl(htmlWrite); This might help.

      Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif

      E 1 Reply Last reply
      0
      • G Gamzun

        System.IO.StringWriter stringWrite = new System.IO.StringWriter(); System.Web.UI.HtmlTextWriter htmlWrite = new HtmlTextWriter(stringWrite); GridView1.RenderControl(htmlWrite); This might help.

        Please don't forget to mark 'Good Answer', if you find it really a good one! Kashif

        E Offline
        E Offline
        Ersan Ercek
        wrote on last edited by
        #3

        good answer it seems exactly what I need. thanks

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups