• 学会使用控件之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.

    补充一句,使用说明是英文的,英文好的朋友可以一显身手了。

  • 相关阅读:
    go module基本使用
    jquery的radio的change事件
    etcd 快速入门
    linux下查看php-fpm是否开启以及如何开启
    js 获取某年的某天是第几周
    gland go list-m:无法识别的导入路径
    Xshell连接有跳板机(堡垒机)的服务器
    PHP中时间戳和时区
    SQL分页过多时, 如何优化
    MySQL语句的优化
  • 原文地址:https://www.cnblogs.com/gudao119/p/1324228.html
Copyright © 2020-2023  润新知