Encounted the issue accident when helping my classmate dealing with his homework assignment,it turns out that I have to consider about 'IsPostBack' when trying to combind the 'DropdownList' in code behind(or it won't get what we expect): protected vo…
探讨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了,今天有看到论坛上一个问题:"两个dropDownList和一个GridView,已经进行了数据绑定,现在想让第一个下拉菜单的数据改变时,第二个下拉菜单自动变到相应的数据,同时选中gridview中相对应的行,不知道如何实现,很急,求大神相助" 其实,实现起来算得上简单,下面先从准备数据开始,创建一个对象Customer: source code: using System; using System.Collections.Generic; using Sy…
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…