The idiot in me finally tuned out. . . Don't ask me what I picked up, it's all written in the title. . . .
Write it down quickly and go to sleep. . . .
At present, I have tried ASP, JS, C++, and C#. I have months or even years of experience in the first three, and I strive to make the last one big as well. . . .
What's next?
Get to the point. . .
Windows application
1, first create two POST variables, these two POST variables simulate the name of the Form in ASP~~~ (I tried it blindly, and it turned out to be a simulated 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 contains the information to be POSTed.
2. Then send it 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 );
//The following are useless, just the above sentence is enough
string sRemoteInfo=System.Text.Encoding.Default.GetString(byRemoteInfo);
//This is to get the return information
textBox1.Text=sRemoteInfo;
axDHTMLEdit1.DocumentHTML=sRemoteInfo;
//The COM component WebBrowser is used below to display the return information. It is of no use and you can ignore it.
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 application
string MyText=System.Web.HttpContext.Current.Request.Form["c"];
in Page_Load
;
string MyText2=System.Web.HttpContext.Current.Request.Form["b"];
//Get the information from two POSTs
StreamWriter sw=new StreamWriter(Server.MapPath(".")+" \1.shtml ", true, Encoding.UTF8);
sw.Write(MyText);
sw.Write(MyText2);
sw.Close();
//true means that the information from POST is written in the append method.
Well, that’s all.
I don’t know if writing files in this way is more efficient than FSO and AdodB.stream and takes up less CPU. I hope someone can give me some guidance!