none
post from my .net console application to a classic asp page

    Question

  • i have a VB.Net 2005 module project and I have a number of values that I need to post from my VB.Net app to a classic ASP page.  i'm told to use HTTP session to do the post.  Does anyone have any easy samples in VB.net where you are posting and passing values to a classic asp page?  thanks.
    Sunday, June 10, 2007 2:29 AM

Answers

  • The HTTP session object is only available from inside an ASP.NET application, so that's not the solution.

     

    HttpWebRequest class is probably the one you want to use. You can set its Method property to "POST" to perform a post. You need to build the post data by hand, because it just posts whatever bytes you tell it to... (HTTP POSTs can contain absolutely any byte stream you like. Forms aren't the only things that POST data.)

     

    There's an example here: http://www.netomatix.com/HttpPostData.aspx

     

    It's in C#, but it should give you a pretty good idea of how to do it. The method calls will all be the same in VB.NET.

    Sunday, June 10, 2007 4:03 PM