fill web form using a windows form written in c#
-
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
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 **************************
-
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 **************************
-
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 **************************
-
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 **************************
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