我在页面1中单击一个按纽后得到页面2中的数据放在文本框textbox1中,
页面2中的数据就是几个汉字:测试车
页面2中的数据就是几个汉字:测试车
解决方案 »
- 如何做一个数据库正在操作的提示框?
- 动态浮动广告图片
- 为什么IP形字符串就传不进参数?
- 异或运算符用”+” “-”替换后保持原有功能
- 高分!!!关于水晶报表10的一系列问题
- 为什么我的history.back()老出问题?
- 操作dos修改ftp密码
- 已经问了3次了,多谢各位高人相助,真心感谢。我都试了但还是连不上SQL很急很急,
- s2sh框架项目中遇到问题,是在struts2的action中获得页面中fck的值问题?
- 用URL传递参数的方法(location.href=?id=参数)最多能传递多长的字符串?
- 有没有办法动态改变DataGrid 每列HeaderText显示的文字?
- 问一个关于网页制作的问题。
2、如果是URL,那用HttpWebRequest去读取数据
http://community.csdn.net/Expert/topic/4931/4931567.xml?temp=.1004907
看看这里面
我在页面上也加上了
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta http-equiv="content-language" content="gb2312">
也不行呀
string url ="http://localhost/test/test.aspx?a="+ Server.UrlEncode("张三");
解-->Server.UrlDecode()
{
string sHtml = "";
HttpWebRequest request;
HttpWebResponse response=null;
Stream stream; while (true)
{
try
{
request =(HttpWebRequest)WebRequest.Create(sUrl);
response=(HttpWebResponse)request.GetResponse();
stream=response.GetResponseStream();
sHtml=new StreamReader(stream,System.Text.Encoding.Default).ReadToEnd();
break;
}
catch (Exception e)
{
if (response!=null) response.Close();
DialogResult result=
MessageBox.Show(null,"Http request time out. Do you want to retry?","Time Out Error",MessageBoxButtons.YesNo);
if (result==DialogResult.No)
throw e; }
}
stream.Close();
response.Close();
return sHtml;
}