假表单提交用C#的WebClient

问题描述:

我需要调用一个网页,并在我的asp.net MVC应用程序模型检索得到的数据。当在网络上访问时,形式如下:

I need to call a web and retrieve the resulting data from the model in my asp.net mvc application. When accessed on the web, the form looks like this:

<form id="textEntryForm" name="textEntryForm" method="post" action="/project/evaluate_to_pdf">
            <textarea id="p" rows="20" name="p" cols="132"/><br/>	
            <input type="button" value="parse" name="do_parse" onclick="new Ajax.Updater('parsedProject','/project/parse',{asynchronous:true,evalScripts:true,on404:function(e){alert('not found!')},parameters:Form.serialize(this.form)});return false"/>
            <input type="button" value="evaluate_to_html" name="do_evaluate_to_html" onclick="new Ajax.Updater('parsedProject','/project/evaluate_to_html',{asynchronous:true,evalScripts:true,on404:function(e){alert('not found!')},parameters:Form.serialize(this.form)});return false"/>
            <input type="button" value="evaluate" name="do_evaluate" onclick="new Ajax.Updater('parsedProject','/project/evaluate',{asynchronous:true,evalScripts:true,on404:function(e){alert('not found!')},parameters:Form.serialize(this.form)});return false"/>
            <input type="button" value="evaluate to pdf source" name="do_evaluate_to_pdf_source" onclick="new Ajax.Updater('parsedProject','/project/evaluate_to_pdf_source',{asynchronous:true,evalScripts:true,on404:function(e){alert('not found!')},parameters:Form.serialize(this.form)});return false"/>
            <input type="submit" id="do_evaluate_to_pdf" value="evaluate_to_pdf" name="do_evaluate_to_pdf"/>
        </form>

我需要通过将输入到textarea的ID =P的数据。如何添加在,使用Web客户端连接?

I need to pass the data that would be entered into textarea id="p". How do add that in, using a WebClient to connect?

谢谢!

修改这不是出于测试目的,我要找回我的应用程序使用的数据。

Edit This isn't for testing purposes, I need to retrieve the data for use in my application.

我只是用这样的:http://www.eggheadcafe.com/community/aspnet/2/69261/you-can-use-the-webclient.aspx