学会使用控件之comboxBox in asp.net --从简单开始(五)
想必winform 里的comboBox令经常使用下拉列表的朋友很爽,既简单功能又多,不仅可以通过下拉框显示数据项,还可以像textBox一样输入,最绚的功能可能就是自动匹配功能了吧。然而在webform里,只有一个dropdownlist,是可以显示下拉数据项,但是要想再自己输入些内容估计就悬了,更别说根据输入内容自动匹配数据项了。在google里搜了一下,好些朋友都是通过一个textBox加上一个listbox,在自己写点Js通过层控制来模仿comboBox,功能实现了,目的却到达的不是很好,弄不好还会错位。作为初学者可以试着去写一下多学习学习,本人比较懒,所以总是喜欢用别人开发好的控件。终于回到正题,今天给朋友们介绍的是MetaBuilders,简单几步就可以得到自己想要的comboBox.下面简单给大家说一下步骤希望能给从没用过别人控件的朋友一点点帮助,也借此机会把自己的随笔放在首页上一次,第一次放首页,如果有觉得不妥的朋友请给出意见,我马上撤回老家。
步骤如下:
1.下载MetaBuilders控件(包括Bll文件,数据文件,使用说明等)http://www.codeplex.com/metabuildersweb,解压文件;
2.打开您的vs(我的是2005,不知道别的版本是否有问题,本人估计其他版本也没问题),打开工具栏,在空白处右击选择“添加选项卡”(个人建议建立一个新的)命名为“MetaBuilder”,在该选项下,右击选择“选择项”(稍等时间可能有点长),在弹出窗口的下方单击“浏览”,选择刚才下载的文件中的MetaBuilders.WebControls.dll文件。
3.选择工具栏里的comboBox,拖到你想要的位置,ok了,就像vs自带的控件一样了,剩下的工作就看你自己了。
该控件组中还有好些不错的控件,等着更多的朋友去发现其中的奥妙,下面列出其中包含的更多控件名和简要说明:(拷自官方首页)
- AdSense Ads - Controls to show your Google AdSense ads.
- CheckedListBox - A Listbox with checkboxes for selection
- ComboBox - The classic type-or-choose control.
- DataControlFields - Three fields for the GridView, BooleanField for boolean values (better than the CheckBoxField), LookupField for ID/Key data to a child datasource, and SelectorField for row selection using checkboxes or radiobuttons.
- DialogWindow - A set of controls which make creating dialog windows a lot easier
- DualList - move items back and forth between two listboxes to select the items
- DynamicListBox - a base control which stores changes to its list of items
- ExpandingButtons - hide and show a target control
- ExpandingPanel - hide and show the content of the panel
- FileUpload - A nicer wrapper than the builtin for basic file uploading
- GlobalRadioButton - A radiobutton which has a page-wide, cross-namingcontainer Group property
- Grouped Lists aka GroupedListBox and GroupedDropDownList enabled support of the html option grouping in extensions of the standard data controls.
- ListLink - A non-visual control which helps you create parent/child relationships between list controls
- MultiFileUpload is a nice compact UI that lets the user select more than one file to upload to the server.
- MultiViewBar is now free and included in the library, source and all.
- OneClick - non-visual control that helps the page developer avoid the dreaded double-button-click
- Polling - controls and framework for showing users simple web polls. Uses a provider framework, with built-in providers for Access and Sql Server.
- ParsingContainer - control which parses a string of server control markup at runtime
- QueryCall - Component which maps querystring parameters to methods in the codebehind
- RemoteWindow - Easy popup windows
- ResizeMonitor - causes a postback on browser-resize, if you need to keep track of dimensions in your app
- RollOverLink - the old mouse-over-out effect on images, made dead-easy
- RuntimeTemplate - Makes it easier to create templates for controls at runtime in code
- UpDown - the classic Windows Up/Down control for numeric entry.
作者:gudao119
出处:https://www.cnblogs.com/gudao119/archive/2008/11/01/1324228.html
版权:本作品采用「署名-非商业性使用-相同方式共享 4.0 国际」许可协议进行许可。
【推荐】国内首个AI IDE,深度理解中文开发场景,立即下载体验Trae
【推荐】编程新体验,更懂你的AI,立即体验豆包MarsCode编程助手
【推荐】抖音旗下AI助手豆包,你的智能百科全书,全免费不限次数
【推荐】轻量又高性能的 SSH 工具 IShell:AI 加持,快人一步
· 如何编写易于单元测试的代码
· 10年+ .NET Coder 心语,封装的思维:从隐藏、稳定开始理解其本质意义
· .NET Core 中如何实现缓存的预热?
· 从 HTTP 原因短语缺失研究 HTTP/2 和 HTTP/3 的设计差异
· AI与.NET技术实操系列:向量存储与相似性搜索在 .NET 中的实现
· 周边上新:园子的第一款马克杯温暖上架
· Open-Sora 2.0 重磅开源!
· .NET周刊【3月第1期 2025-03-02】
· 分享 3 个 .NET 开源的文件压缩处理库,助力快速实现文件压缩解压功能!
· [AI/GPT/综述] AI Agent的设计模式综述