Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C#
  4. fill web form using a windows form written in c#

fill web form using a windows form written in c#

Scheduled Pinned Locked Moved C#
csharpquestion
5 Posts 2 Posters 0 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • C Offline
    C Offline
    cemlouis
    wrote on last edited by
    #1

    Hi, As I mentioned in the subject the question is simple... I have a web form in my site and I have to periodically send data to this form by using a windows form application written in C# Thank you, Cem Louis

    S 1 Reply Last reply
    0
    • C cemlouis

      Hi, As I mentioned in the subject the question is simple... I have a web form in my site and I have to periodically send data to this form by using a windows form application written in C# Thank you, Cem Louis

      S Offline
      S Offline
      sreejith ss nair
      wrote on last edited by
      #2

      hi, I got your submition. But where is your queary or what is your doubt ?:confused: ************************** S r e e j i t h N a i r **************************

      C 1 Reply Last reply
      0
      • S sreejith ss nair

        hi, I got your submition. But where is your queary or what is your doubt ?:confused: ************************** S r e e j i t h N a i r **************************

        C Offline
        C Offline
        cemlouis
        wrote on last edited by
        #3

        Do you need the query? I didn't want to post the url to a high known forum...

        S 1 Reply Last reply
        0
        • C cemlouis

          Do you need the query? I didn't want to post the url to a high known forum...

          S Offline
          S Offline
          sreejith ss nair
          wrote on last edited by
          #4

          hi, You Wrote : Do you need the query? I didn't want to post the url to a high known forum... What you mean by this ? What i asked you is What's is your doubt ? What you really want to know ? Which sort of help ? Nothing else. ************************** S r e e j i t h N a i r **************************

          C 1 Reply Last reply
          0
          • S sreejith ss nair

            hi, You Wrote : Do you need the query? I didn't want to post the url to a high known forum... What you mean by this ? What i asked you is What's is your doubt ? What you really want to know ? Which sort of help ? Nothing else. ************************** S r e e j i t h N a i r **************************

            C Offline
            C Offline
            cemlouis
            wrote on last edited by
            #5

            Hi, Thank you for your interest, anyway here is the link: http://www.stratejiparki.com/name.php[^] When you wrote and submit something it displays what you had written... I made a form and put a textbox, button, label on it. Then I made the button's click function like below: private void button1_Click(object sender, System.EventArgs e) { // Download the data to a buffer. WebClient client = new WebClient(); // Upload some form post values. NameValueCollection form = new NameValueCollection(); form.Add("email", textBox_email.Text.ToString()); Byte[] responseData = client.UploadValues("http://www.stratejiparki.com/name.php"); HttpWebRequest webRequest = (HttpWebRequest) WebRequest.Create("http://www.stratejiparki.com/name.php"); // ask the web request for a webResponse encapsulating // that page HttpWebResponse webResponse = (HttpWebResponse) webRequest.GetResponse( ); // get the streamReader from the response StreamReader streamReader = new StreamReader(webResponse.GetResponseStream( ), Encoding.ASCII); string outputString; outputString = streamReader.ReadToEnd( ); streamReader.Close( ); label1.Text = outputString; } The thing that I want is to write a string to the textbox on windows form than press the button. The textbox's text must go the form on www.stratejiparki.com/name.php then the windows form takes the data on showname.php and write to the label on windows form... Thank you, Cem Louis

            1 Reply Last reply
            0
            Reply
            • Reply as topic
            Log in to reply
            • Oldest to Newest
            • Newest to Oldest
            • Most Votes


            • Login

            • Don't have an account? Register

            • Login or register to search.
            • First post
              Last post
            0
            • Categories
            • Recent
            • Tags
            • Popular
            • World
            • Users
            • Groups