window| Program
I've finally come out of this fool. Don't ask me what I pulled out, it's all written in the title ....
Write it down, and then sleep ....
Now have tried asp,js,c++,c#, the first three are months or even years of experience, to try to make the last one too big ....
What's next?
Cut to the chase ...
Windows-Side applications
1, first set up two post variables, and these two post variables simulate the name~~~ of the form in ASP (I tried to be a mock form)
System.Net.WebClient webclientobj=new System.Net.WebClient ();
System.Collections.Specialized.NameValueCollection postvars=new System.Collections.Specialized.NameValueCollection ();
Postvars.add ("C", TextBox2.Text);
Postvars.add ("B", TextBox3.Text);
TextBox2.Text, there's a message for post, huh?
2, and then sent to a Web page: http://www.dc9.cn/t/default.aspx
Try
{
Byte[] Byremoteinfo=webclientobj.uploadvalues ("http://www.dc9.cn/t/default.aspx", "POST", postvars);
It's useless down there, just a word on it.
String sremoteinfo=system.text.encoding.default.getstring (Byremoteinfo);
This is the Get return information
Textbox1.text=sremoteinfo;
Axdhtmledit1.documenthtml=sremoteinfo;
The following uses the COM component WebBrowser, lets him display returns the information, is useless, may not look.
Object Url= "About:blank";
Object Nothing=system.reflection.missing.value;
This.axWebBrowser1.Navigate2 (ref url,ref Nothing,ref nothing,ref nothing,ref Nothing);
(MSHTML. IHTMLDocument2) this.axWebBrowser1.Document). Write (Sremoteinfo);
}
Catch
{}
Web-side applications
1, written in Page_Load.
String mytext=system.web.httpcontext.current.request.form["C"];
String mytext2=system.web.httpcontext.current.request.form["B"];
Get two Post information
StreamWriter Sw=new StreamWriter (Server.MapPath (".") + "\\1.shtml", true, Encoding.UTF8);
Sw. Write (MyText);
Sw. Write (MYTEXT2);
Sw. Close ();
True means that the post information is written in a append manner
Well, it's written here.
Do not know how to write files in this way is more efficient than FSO and adodb.stream CPU small, but also hope that the expert guidance!