把DataTble中的字段拼接进字符串的写法
来源:互联网 发布:淘宝啥时候能买彩票 编辑:程序博客网 时间:2024/06/07 09:14
<%@ WebHandler Language="C#" Class="GetcityByProvinceIDHandler" %>
using System;
using System.Web;
using System.Web;
public class GetcityByProvinceIDHandler : IHttpHandler {
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
//context.Response.Write("Hello World");
public void ProcessRequest (HttpContext context) {
context.Response.ContentType = "text/plain";
//context.Response.Write("Hello World");
int ID=Convert.ToInt32( context.Request["ID"]);//取到传过来的ID值
BLL.StaticDataBll bll = new BLL.StaticDataBll();
System.Data.DataTable table = bll.getCityByProvinceID(ID);//得到市的数据源
System.Data.DataTable table = bll.getCityByProvinceID(ID);//得到市的数据源
System.Text.StringBuilder sb = new System.Text.StringBuilder();
foreach (System.Data.DataRow row in table.Rows)
{
sb.Append(row["ID"].ToString()).Append("|").Append(row["FName"].ToString()).Append("$");
{
sb.Append(row["ID"].ToString()).Append("|").Append(row["FName"].ToString()).Append("$");
//context.Response.Write(row[]);
//sb.Append(row["ID"].ToString()).Append("|");
}
}
context.Response.Write(sb.ToString().Trim('$'));
}
public bool IsReusable {
get {
return false;
}
}
}
}
public bool IsReusable {
get {
return false;
}
}
}
- 把DataTble中的字段拼接进字符串的写法
- sql中的字段、字符串拼接
- 按分组把字段拼接的方法
- oracle 拼接字符串的函数写法
- Loadrunner 字符串拼接的二种写法
- 让一个字段相同的,把另一个字段拼接在一起
- sql 字段拼接字符串的方法
- 字符串字段拼接示例
- mysql中的字符串的拼接
- mysql中的字符串的拼接
- mysql中的字符串的拼接
- mysql中的字符串的拼接
- 关于SQL中的字段“包含”与“包含于”字符串的写法
- 关于SQL中的字段“包含”与“包含于”字符串的写法
- Oracle_查询字段(字符串拼接)
- js把数组拼接字符串
- SQL 7 计算字段 - 4. 字符串的拼接
- 把字段的值转换成字符串
- 从零开始--系统深入学习android(实践-让我们开始写代码-Android框架学习-7.通知)
- Python正则表达式指南
- ASP.NET UserControl 通信
- 一个Table表单样式
- wordpress 自定义 widgets
- 把DataTble中的字段拼接进字符串的写法
- 40 Bootstrap Tools and Generators for Web Developers
- NSThread的使用
- 斯坦福机器学习公开课笔记(一)--单变量线性回归
- 今天开始学Pattern Recognition and Machine Learning (PRML),章节1.6,Information Theory信息论简介
- 数据库查询之多表级联查询(join关键字)
- fopen中文件的几种打开模式比较
- hdu 1234 开门人和关门人
- VIM+Graphviz ,打造快速输入,所思,所写,即所见,即所得的流程图编辑环境