Hello-
I would like to implement something like what is covered in this article:
http://www.netomatix.com/HttpPostData.aspx
It shows how to post a form programtically vs with an actual form from a web
page.
Basically, I will have a desktop application that will post a form to an
..aspx page.
I need to retrieve the values from the form that is sent.
When I look at Request.Form AllKeys it does not have my form elements from
the desktop application. Where do I retrieve these values?
Here is a snip from the article for those that don't feel like following a
link right now. This should give you an idea of what I'm after
ASCIIEncoding encoding=new ASCIIEncoding() ;
string postData="useri d="+strId;
postData += ("&username="+s trName);
byte[] data = encoding.GetByt es(postData);
// Prepare web request...
HttpWebRequest myRequest =
(HttpWebRequest )WebRequest.Cre ate("http://localhost/MyIdentity/Default.aspx"
);
myRequest.Metho d = "POST";
myRequest.Conte ntType="applica tion/x-www-form-urlencoded";
myRequest.Conte ntLength = data.Length;
Stream newStream=myReq uest.GetRequest Stream();
// Send the data.
newStream.Write (data,0,data.Le ngth);
newStream.Close ();
Thanks for any help you can offer!
Steve