How to embed HTML into a C# component

  • Thread starter Thread starter 2X4Man
  • Start date Start date
2

2X4Man

I am creating a webmail solution and need to be able to display HTML e-
mails in a placeholder without screwing up the styling of the rest of
the page. I know that I could use an iframe to do this, but the
problem that I am running into is that iframe's require a src which
points to a file, I don't have an HTML file to display I just have the
text of the e-mail. Any suggestions for the best way to solve this
problem?
 
2X4Man said:
I am creating a webmail solution and need to be able to display HTML e-
mails in a placeholder without screwing up the styling of the rest of
the page. I know that I could use an iframe to do this, but the
problem that I am running into is that iframe's require a src which
points to a file, I don't have an HTML file to display I just have the
text of the e-mail. Any suggestions for the best way to solve this
problem?

You can have the src attribute of the iframe point to an asp script which will
output the contents of the email. Just set content-type properly and you should
be good to go.

Chris.
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top