.ashx后台:
public void ProcessRequest(HttpContext context)
{
context.Request.ContentEncoding = Encoding.GetEncoding("gb2312");
context.Response.ContentType = "text/plain";
if (context.Request.Form["_type"] != null)
{
switch (context.Request.Form["_type"])
{
case "_AllPageNum": SendAllPageNum(context); break;
default: break;
}
}
}
private void SendAllPageNum(HttpContext context)
{
string TableName = context.Request.Form["_TableName"];
string SelectWhere = context.Request.Form["_SelectWhere"]; }string SelectWhere = context.Request.Form["_SelectWhere"] 页面输入的是汉字,但是传过来
就成了乱码le
public void ProcessRequest(HttpContext context)
{
context.Request.ContentEncoding = Encoding.GetEncoding("gb2312");
context.Response.ContentType = "text/plain";
if (context.Request.Form["_type"] != null)
{
switch (context.Request.Form["_type"])
{
case "_AllPageNum": SendAllPageNum(context); break;
default: break;
}
}
}
private void SendAllPageNum(HttpContext context)
{
string TableName = context.Request.Form["_TableName"];
string SelectWhere = context.Request.Form["_SelectWhere"]; }string SelectWhere = context.Request.Form["_SelectWhere"] 页面输入的是汉字,但是传过来
就成了乱码le
解决方案 »
- 验证控件不起作用
- asp.net如何给ajax返回XML数据
- 关于oracle数据导入到sqlserver时表名前缀的问题
- 分页不显示,也不报错
- 在.net中静态生成文章,而对有些篇幅大的文章要进行分页处理,不知道各位是怎么实现的,思路是什么?
- 这样写合理吗?
- 超时时间已到。超时时间已到,但是尚未从池中获取连接。出现这种情况可能是因为所有池连接均在使用,并且达到了最大池大小。
- 获取模版列中的textbox值,为什么总是空??30分!!!
- 请问如何在页面的构造函数中使用Session中的值?
- 如何在Page_load中自动弹出对话框?
- 检索 COM 类工厂中 CLSID 为 {000209FF-0000-0000-C000-000000000046} 的组件时失败,原因是出现以下错误: 800
- 求个Newtonsoft.Json.dll, 要个 3.5 的
接受的时候解码 HttpUtility.UrlDecode