07 2008 档案

摘要:有人问,既然RadioButtonList可以实现单选,哪么为什么还要用CheckBoxList实现单选呢?这样做除去费时以外好像没有什么“好处”;但是有时用RadioButtonList实现单选不太合适。例如:我是用户,我选择其中一项后,又不想选择其中一项怎么办?而且那个RadioButtonList怎么看都不顺眼,确实有点丑。好了废话不说了,实现CheckBoxList单选的代码如下: 方法1... 阅读全文
posted @ 2008-07-17 15:38 Shapley 阅读(1901) 评论(0) 推荐(0) 编辑
摘要:动态创建asp.net控件并保存其状态,简要总结如下: 1:背景知识:需要了解Page的生存周期。 2:方法总结: 1> 在页面代码文件中的声明区域写(这里以Label控件为例): Label x = new Label(); pageload事件中代码为: protected void Page_Load(object sender, EventArgs e) { this.Page.C... 阅读全文
posted @ 2008-07-09 09:36 Shapley 阅读(844) 评论(0) 推荐(0) 编辑
摘要:1,JavaScript设置链接不可用: ScriptManager.RegisterStartupScript(Page, typeof(Page), "", "", false); 阅读全文
posted @ 2008-07-03 08:59 Shapley 阅读(217) 评论(0) 推荐(0) 编辑