最新下载
热门教程
- 1
- 2
- 3
- 4
- 5
- 6
- 7
- 8
- 9
- 10
asp.net AutoComplete Control
时间:2022-06-25 04:14:59 编辑:袖梨 来源:一聚教程网
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">
相关文章
- 塞尔达传说王国之泪提马瓦卡神庙怎么过 05-07
- 奇迹暖暖沐光恩典怎么样 05-07
- 奇迹暖暖旧宴恩典怎么玩 05-07
- 以闪亮之名迟夜巡演怎么样 05-07
- Swrv币虚拟货币 05-07
- bzone交易平台 05-07