Re: WebRequest.GetResponseStream() returns null.
Try this. for this purpose use WebClient is easier:
private void saveURL(string url)
{
WebClient wc = new WebClient();
wc.DownloadStringCompleted += new DownloadStringCompletedEventHandler(wc_DownloadStringCompleted);
wc.DownloadStringAsync(new Uri(url));
}
void wc_DownloadStringCompleted(object sender, DownloadStringCompletedEventArgs e)
{
if (e.Error == null)
{
HtmlPage.Window.Alert(e.Result); //e.Rresult should be the returning string of your page.
}
}
If you had cross-domain issue, usually e.Error would say "Download failure." If you did not get an error, but returning string is empty that might be something else.
Software Engineer
Aprimo, Inc
Please remember to mark the replies as answers if they answered your question