易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 的ComboBox 可输入可选择下拉列表

文章出处:http://www.cnblogs.com/ejiyuan/archive/2007/11/09/954325.html
using System;
using System.ComponentModel;
using System.Web;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Collections;
using System.Web.UI.Design;
[assembly: TagPrefix("AtomNet.Web.UI.WebControls", "AtomNet")]
namespace AtomNet.Web.UI.WebControls
{
    /// <summary>
    /// Represents a control that allows the user to select a single item from a drop-down list,
    /// or type in a new value that is not in the list.
    /// </summary>
    /// <remarks>
    /// Since the ComboBox control inherits from <see cref="System.Web.UI.WebControls.ListBox"/>,
    /// you can use it in exactly the same manner (including DataBinding).
    /// For older browsers that do not support the functionality required to render this control,
    /// a normal dropdown box will be emitted instead.
    /// </remarks>
    [ToolboxData("<{0}:ComboBox runat=\"server\"></{0}:ComboBox>")]
    [ValidationPropertyAttribute("SelectedValue")]
    [Designer(typeof(AtomNet.Web.UI.WebControls.ComboBoxDesigner))]
    public class ComboBox : System.Web.UI.WebControls.ListBox
    {
        #region 私有属性
        /// <summary>
        /// The <see cref="System.Web.UI.WebControls.TextBox"/> used internally to allow the user
        /// to type in new values.
        /// </summary>
        TextBox textBox = new TextBox();
       


相关文档:

浅谈ASP.net安全编程

在Web编程过程中,存在着很多安全隐患。比如在以前的ASP版本中,Cookie为访问者和编程者都提供了方便,并没有提供加密的功能。打开IE浏览器,选择“工具”菜单里的“Internet选项”,然后在弹出的对话框里单击“设置”按钮,选择“查看文件”按钮,在弹出的窗口中,就会显示硬盘里 ......

ASP.NET中防止页面多次提交的代码

javascript< script language="javascript"> < !-- function disableOtherSubmit() {
var obj = event.srcElement;
var objs = document.getElementsByTagName('INPUT');
for(var i=0; i< objs.length; i++)
{
if(objs[i].type.toLowerCase() == 'submit')
{
objs[i].disabled = true;
}
} ......

ASP.NET快捷键大全

VS2008 快捷键大全[转帖]
Ctrl+m+Crtr+o折叠所有大纲
Ctrl+M+Crtr+P: 停止大纲显示
Ctrl+K+Crtr+C: 注释选定内容
Ctrl+K+Crtr+U: 取消选定注释内容
Ctrl+J : 列出成员 智能感知
Shift+Alt+Enter: 切换全屏编辑
Ctrl+B,T / Ctrl+K,K: 切换书签开关
Ctrl+B,N / Ctrl+K,N: 移动到下一书签
Ctrl+B,P: 移动到上一书签
......

asp.net中时间格式化的几种方法

1、数据控件(如DataGrid/DataList等控件)格式化日期方法:
e.Item.Cell[0].Text = Convert.ToDateTime(e.Item.Cell[0].Text).ToShortDateString();
//指定列(第1列)格式化日期
2、用String类转换日期显示格式:
String.Format( "yyyy-MM-dd ",yourDateTime);
3、用Convert方法转换日期显示格式:
Convert.ToDat ......

ASP.NET 指定验证组


      使用验证组可以将页面上的验证控件归为一组。可以对每个验证组执行验证,该验证与同一页的其他验证组无关。
将要分组的所有控件的 ValidationGroup 属性设置为同一个名称(字符串)即可创建验证组。可以为验证组分配任何名称,但必须对该组的所有成员使用相同的名称。
在回发过程中,只 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号