Ajax实现在textbox中输入内容,动态从数据库中模糊查询显示到下拉框中http://www.cnblogs.com/singlepine/archive/2006/05/21/405566.html
功能:在textbox中输入内容,动态从数据库模糊查询显示到下拉框中,以供选择
1.建立一aspx页面,html代码
2.cs代码
3.
源代码下载 http://singlepine.cnblogs.com/Files/singlepine/ajaxselect.rar
4.数据库脚本
CREATE TABLE [dbo].[city](
[id] [int] NOT NULL,
[cityID] [nvarchar](6) COLLATE Chinese_PRC_CI_AS NULL,
[city] [nvarchar](50) COLLATE Chinese_PRC_CI_AS NULL,
[father] [nvarchar](6) COLLATE Chinese_PRC_CI_AS NULL,
CONSTRAINT [PK_city] PRIMARY KEY CLUSTERED
(
[id] ASC
)WITH (IGNORE_DUP_KEY = OFF) ON [PRIMARY]
) ON [PRIMARY]