It is a WindowsForm application. I used C# code to get the HTML string from a website successfully.
Inside the HTML code, the form looks like this:
<form id="editform" name="editform" method="post" action="/blablabla/index.php?title=title1&action=submit" enctype="multipart/form-data">
<textarea tabindex='1' accesskey="," name="Textbox1" id="Textbox1" rows='25' cols='80' >
item1;
item2;
....
</textarea>
<input id="wpSave" name="wpSave" type="submit" tabindex="5" value="Save page" accesskey="s" title="Save your changes" />
</form>
I tried to use
HttpWebRequest webRequest = (HttpWebRequest)WebRequest.Create(URL);
HttpWebResponse response = (HttpWebResponse)webRequest.GetResponse();
...
these ways to get the text inside "textarea" successfully, but I am stuck on submitting the edited text to the original website. To clarify, I want to edit a textarea inside an HTML form of a website using my WinForm Application, and submit it.
What is the best way to use C# to modify the text inside "textarea", and submit the changed text to the original website? Thank you.