asp.net - How do I retrieve HTML dynamically generated from an aspx page? -


To be specific, this is what I'm doing, and that's what I'm trying to do :

I am coding an asp.net page, in which the VB code is behind. When the user clicks on a button on the user page, I send them an email with information and instructions. Rather than sending a plain text email, I send a nice, beautiful, HTML-formatted one. Right now, I am doing it in such a way that I know it will be difficult to maintain. That is, I'm writing all the HTML directly I.e.

  Markup + = "& lt; fieldet>" Markup + = "legend"; Markup + = "Required Doc" markup + = "& lt; / legend & gt;"  

... and so on. Is there a way to create an ASPX page (back to VB code), and send that html in that part of the email to that page? Information is dynamic, so for this pseudo-page to correctly format HTML, logic will be required on the on-load event.

Thank you!

  webclient client = new webclient (); String html = client DownloadString ("http://domain.com/emailtemplate.aspx?id=1");  

Comments

Popular posts from this blog

c# - sqlDecimal to decimal clr stored procedure Unable to cast object of type 'System.Data.SqlTypes.SqlDecimal' to type 'System.IConvertible' -

Calling GetGUIThreadInfo from Outlook VBA -

Obfuscating Python code? -