Ok, I am working on a webscrape for a friend/customer. I have tried many different approaches, using fiddler to analyze what is going on. But I cannot seem to get it to work. I was hoping that someone with more experience than I have could give it a look and see what I am doing wrong. i am new here, so if I put this code in wrong, please forgive me. My goal here is to scrape this site with a post that it requires, then take the data and format it to print. I havent gotten to the formatting part so lets not worry about that. I am really at my wits end here, I have really tried before coming to ask for help, but I am new to asp.net and would be very grateful for some help.But, anyway, I am still trying to get data back, here is the code....
default.aspx ( web form ) ************************************************
<%
<!
<
</
<!--
var
if
theForm = document.Form1;
}
function
theForm.__EVENTTARGET.value = eventTarget;
theForm.__EVENTARGUMENT.value = eventArgument;
theForm.submit();
// -->
default.aspx.cs ( code ) ************************************************
using
public
{
System.IO.
WebRequestObject.Accept =
WebRequestObject.Referer =
WebRequestObject.Headers.Add(
WebRequestObject.ContentType =
WebRequestObject.UserAgent =
WebRequestObject.ContentLength = (
WebRequestObject.KeepAlive =
c.Name =
c.Value = Session.SessionID;
c.Domain =
WebRequestObject.CookieContainer =
WebRequestObject.CookieContainer.Add(c);
WebRequestObject.Method =
myRequestStream = WebRequestObject.GetRequestStream();
System.Diagnostics.
ex.Message + System.
ex.StackTrace + System.
ex.Source + System.
streamWriter.Write(stringPost, 0, stringPost.Length);
streamWriter.Flush();
streamWriter.Close();
WebResponseObject = (
sr =
sr.Close();
WebResponseObject.Close();
WebRequestObject.Abort();