using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;using System.Text; using System.IO; using System.Data; public partial class DownloadItem_CmdExeItem : System.Web…
测试环境:vs2013..Net4.5.mvc5 一.Asp.Net MVC绑定控件原理说明 以Html.TextBox为例 /// <param name="name">名称,对应name和ID</param> /// <param name="value">value值,如果value为null或不存在,那么此时value自动等于name.获取的顺序为:先从ViewData中查找是否存在键值为name值的项,如果ViewDat…
html代码: <td>                        <asp:HiddenField ID="hiddenchuli" Value='<%#Eval("ID")%>' runat="server" />                        <asp:DropDownList ID="drpstatus1" runat="server"&…
代码: //声明泛型 List<category> inof = new List<category>();//二级分类 //声明类使用的对象类 public class category { public category(string id, string name) { Id = id; Name = name; } private string id; public string Id { get { return id; } set { id = value; } } p…
原文地址:asp.net 弹出式日历控件 选择日期 Calendar控件 作者:逸苡 html代码: <%@ Page Language="C#" CodeFile="calendar.aspx.cs" Inherits="calendar" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w…
自动提交的属性: AutoPostBack="True" 1.RadioButtonList     单选集合 -属性:RepeatDirection:Vertical (垂直排布)/Horizontal (横向排布) RepeatLayout:Table (表格排布方式)/Flow (span排布方式) RepeatColumns:         设置为多少列. 每一个单选按钮都是一个ListItem对象,他有  Enable(是否可用).  selected(默认选中)  Tex…
DropDownList和ListBox实现两级联动功能.他们也能够将从后台数据库中搜选的出来的信息加以绑定.这里要实现的功能是在DropDownList中选择"省",然后让ListBox自己主动将其省份下的"市"显示出来,这就是所谓的两级联动功能,这个功能我们在非常多注冊网页上看见.今天咱们就用ASP.NET解开其神奇的面纱. 一.设置前台界面,在Web窗口中加入DropDownList和ListBox两个控件.界面图例如以下所看到的. 二.编写后台代码 在这,后…
探讨C#.NET下DropDownList的一个有趣的bug及其解决办法 摘要: 本文就C#.Net 环境下Web开发中经常使用的DropDownList控件的SelectedIndex属性进行了详细的探讨,发现了这一属性在使用中存在的问题,并经过测试,提出了回避和解决的办法. 关键词: DropDownList,SelectedIndex, 跟踪调试, C#.NET Probe Into A Bug of DropDownList in C#.NET and the Resolvent Abs…
asp.net mvc中DropDownList的使用. 下拉列表框 以分为两个部分组成:下拉列表和默认选项 DropDownList扩展方法的各个重载版本基本上都会传递到这个方法上:   public static string DropDownList(this HtmlHelper htmlHelper, string name, IEnumerable<SelectListItem>selectList, string optionLabel, IDictionary<strin…
在绑定DropDownList时如果出现多次绑定,会出错以下错误: “不能在DropDownList 中选择多个项” 经了解,只需要在选中值是清空选择即可:xxDropDownList.ClearSelection() : /// <summary>    /// 设定选中项    /// </summary>    /// <param name="list"></param>    public static void SetList…