欢迎加入站点基地设计开发交流群:30720409
详细内容
.Net自动完成功能下拉列表样式
发布日期:2014-02-17     点击:3924     字体:[ ]
  添加CSS样式表

    <style type="text/css">
    /*AutoComplete flyout */
.autocomplete_completionListElement

visibility : hidden;
margin : 0px!important;
background-color : white;
color : windowtext;
border : buttonshadow;
border-width : 1px;
border-style : solid;
cursor : 'default';
overflow-y : scroll;
overflow-x : hidden;
text-align : left;
height:100px;
list-style-type : none;
}

/* AutoComplete item */
.autocomplete_listItem
{
background-color : window;
color : windowtext;
padding : 1px;
}

/* AutoComplete highlighted item */
.autocomplete_highlightedListItem
{
background-color: #316AC5;
color: white;
padding: 1px;
}


    </style>

 

AutoCompleteExtender使用样式

<cc1:AutoCompleteExtender ID="txtLB_AutoCompleteExtender" runat="server"  DelimiterCharacters="|" Enabled="True"
MinimumPrefixLength="1" ServiceMethod="GetTextStringLB" ServicePath="WebService.asmx" TargetControlID="txtLB" UseContextKey="True" 
CompletionInterval="100"  CompletionSetCount="30"
CompletionListCssClass="autocomplete_completionListElement"
CompletionListItemCssClass="autocomplete_listItem"
CompletionListHighlightedItemCssClass="autocomplete_highlightedListItem"
>
</cc1:AutoCompleteExtender >

这样就可以让自动完成功能实现下拉列表形式,出现滚动条。

用户评论
昵称 
内容  *
验证码   
   
Copyright © 2010 zdbase.com All Rights Reserved. 苏ICP备15039389号 可人软件设计