tags:

views:

39

answers:

2

Hi,

We used chilkatdotnet.dll to do this. The dll has a function called GetEmail(url) that will execute the url and return the html text that is rendered by the url. for example if we say GetEmail('www.stackoverflow.com') it will return the html text same as the one that we get when we click on view source. We are trying to implement the same functionality using .NET 2.0.

Please let me know if you have any ideas.

Thanks, sridhar.

+6  A: 

Isn't this all you want?

string s = new System.Net.WebClient().DownloadString(url);
Mehrdad Afshari
+1 That's the one.
Andrew Hare
Yes I think this is what I am looking for except one minor issue. If the page has images then it should convert it into bytes or something and embed it in the string. what I am trying to do is set the result of this as the email body so that the images will also be displayed as inline content.
Sridhar
There's no class in the .NET framework that does this. You should search for a third party library.
Mehrdad Afshari
A: 

The HTTPWebRequest Class is probably something you'd want to look at; especially the GetResponse method. Examples are provided on the GetResponse documentation page.

You