最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net AutoComplete Control
时间:2011-05-04 编辑:简简单单 来源:一聚教程网
asp教程.net autocomplete control
<%@ page language="c#" %>
<%@ register tagprefix="ajax" namespace="ajaxcontroltoolkit"
assembly="ajaxcontroltoolkit" %>
<%@ import namespace="system.linq" %>
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">
方法二
file: fileservice.asmx
<%@ webservice language="c#" class="fileservice" %>
using system;
using system.web;
using system.web.services;
using system.web.services.protocols;
using system.io;
using system.linq;
[webservice(namespace = "http://tempuri.org/")]
[webservicebinding(conformsto = wsiprofiles.basicprofile1_1)]
[system.web.script.services.scriptservice]
public class fileservice : system.web.services.webservice {
[webmethod]
public string[] getsuggestions(string prefixtext, int count)
{
directoryinfo dir = new directoryinfo("c:windows");
return dir
.getfiles()
.where( f => f.name.startswith(prefixtext) )
.select( f => f.name )
.toarray();
}
}
file: autocompletewebservice.aspx
<%@ page language="c#" %>
<%@ register tagprefix="ajax" namespace="ajaxcontroltoolkit"
assembly="ajaxcontroltoolkit" %>
"http://www.w3.org/tr/xhtml1/dtd/xhtml1-transitional.dtd">
http://www.w3.org/1999/xhtml">
相关文章
- 理解Asp.Net中WebForm的生命周期 06-20
- asp.net中使用母版制作出的页脚效果 05-17
- ASP.NET在使用X509Certificate2出现问题时的一些解决方法 05-16
- ASP.NET 定时器回调方法的重入 04-20
- 剖析Asp.Net Web API路由系统---WebHost部署方式 04-13
- Asp.net用Button打开另一个的frm的教程 12-26