Sorry I am a bit fried from serveral other things today and just am not
seeing it. Can you post an example of the code calling the page please.
Thansk very much in adavance.
> If I understand you correctly, you're looking to create HTML page
> template interspersed with data to be sent in email.Here is an approach
[quoted text clipped - 8 lines]
>
> HTH
souri challa - 22 Jul 2005 23:39 GMT
Here is some code. Hope this enough to get you started.
/// <summary>
/// Used to screen scrape a web page and get the HTML output.
/// This approach is employed to create rich HTML text used for the
notification templates.
/// </summary>
public string GetWebPageHTMLString(string url,NameValueCollection
nameValueCollection)
{
System.Net.WebClient wc = new WebClient();
wc.Credentials = CredentialCache.DefaultCredentials;
Byte[] htmlString = wc.UploadValues(url,"POST",nameValueCollection);
System.Text.UTF8Encoding oUTF8 = new System.Text.UTF8Encoding();
return oUTF8.GetString( htmlString);
}
You may call this like.
NameValueCollection _postData = new NameValueCollection();
_postData.Add("variable1",value1)
_postData.Add("variable2",value2);
string html=
GetWebPageHTMLString(url,_postData);
//Now email this HTML