request and response+asp.net 2.0+c#

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sridhar21
    New Member
    • Feb 2007
    • 26

    request and response+asp.net 2.0+c#

    hi to all

    This is sridhar

    I have one doubt

    i went to sent a request to a web site i need some response from that web site


    For example :


    I want to register no. as a request to a web site and mark sheet while be the response from that web site?


    Example with code will be very useful for me

    thanks

    sridhar
  • Plater
    Recognized Expert Expert
    • Apr 2007
    • 7872

    #2
    System.Net.WebR equest
    It's a good thing.

    Comment

    • sridhar21
      New Member
      • Feb 2007
      • 26

      #3
      Originally posted by Plater
      System.Net.WebR equest
      It's a good thing.



      I need some explaination eith code plz

      thanks
      sridhar

      Comment

      • Plater
        Recognized Expert Expert
        • Apr 2007
        • 7872

        #4
        Originally posted by sridhar21
        I need some explaination eith code plz

        thanks
        sridhar
        I am sorry, I had linked you to the underlying class and not the correct class.

        Have a look at this:
        Code:
        System.Net.HttpWebRequest hwreq = (System.Net.HttpWebRequest)System.Net.HttpWebRequest.Create("http://www.google.com/");
        System.Net.HttpWebResponse hwresp = (System.Net.HttpWebResponse)hwreq.GetResponse();
        StreamReader sr = new StreamReader(hwresp.GetResponseStream());

        Comment

        • radcaesar
          Recognized Expert Contributor
          • Sep 2006
          • 759

          #5
          Hey is this a web site or web service ?

          :)
          Originally posted by sridhar21
          hi to all

          This is sridhar

          I have one doubt

          i went to sent a request to a web site i need some response from that web site


          For example :


          I want to register no. as a request to a web site and mark sheet while be the response from that web site?


          Example with code will be very useful for me

          thanks

          sridhar

          Comment

          Working...