博客
关于我
强烈建议你试试无所不能的chatGPT,快点击我
[C#]提交表单
阅读量:7106 次
发布时间:2019-06-28

本文共 1377 字,大约阅读时间需要 4 分钟。

C#  Winform提交表表单的操作:

//登陆         private void button1_Click(object sender, EventArgs e)         {             string name = textBox1.Text.Trim();             WebClient w = new WebClient();             System.Collections.Specialized.NameValueCollection VarPost = new System.Collections.Specialized.NameValueCollection();              VarPost.Add("type", "denglu");             VarPost.Add("name", name);             byte[] byRemoteInfo = w.UploadValues("http://192.168.1.180/handler/CheckUserName.ashx", "POST", VarPost);             string sRemoteInfo = System.Text.Encoding.UTF8.GetString(byRemoteInfo);             textBox1.Text = sRemoteInfo;         }         //离开         private void button2_Click(object sender, EventArgs e)         {             string name = textBox1.Text.Trim();             WebClient w = new WebClient();             System.Collections.Specialized.NameValueCollection VarPost = new System.Collections.Specialized.NameValueCollection();              VarPost.Add("type", "likai");             VarPost.Add("name", name);             byte[] byRemoteInfo = w.UploadValues("http://192.168.1.180/handler/CheckUserName.ashx", "POST", VarPost);             string sRemoteInfo = System.Text.Encoding.UTF8.GetString(byRemoteInfo);             textBox1.Text = sRemoteInfo;         }

添加:

本文转蓬莱仙羽51CTO博客,原文链接:http://blog.51cto.com/dingxiaowei/1366160,如需转载请自行联系原作者

你可能感兴趣的文章
[深入JUnit] 测试运行的入口
查看>>
Vmware 虚拟机三种网络模式最详细解说【转载】
查看>>
开源文档大震荡:oracle将openoffice捐献给apache基金会
查看>>
单车修电脑的乐趣
查看>>
二维数组排序
查看>>
Android Matrix
查看>>
JS实现OO机制
查看>>
约瑟夫问题
查看>>
python笔记第十天 模块
查看>>
自动办公系统
查看>>
asp.net mvc 3 unobtrusive client side validation not working in IE
查看>>
二.自动化接口测试---用例设计思路、模版
查看>>
MongoDB的快速手动安装
查看>>
java把结果集序列化成json通过out流传给前台步骤
查看>>
排序前后console.log输出无变化
查看>>
Subsets II
查看>>
Daily Scrum02 11.29
查看>>
深入理解类成员函数的调用规则(理解成员函数的内存为什么不会反映在sizeof运算符上、类的静态绑定与动态绑定、虚函数表)...
查看>>
openstack 租户ip 手动配置 openstack静态租户ip
查看>>
POJ2239 Selecting Courses(二分图)
查看>>