当我们在使用CalendarExtender控件时,TextBox的ReadOnly属性默认为'true",要获取TextBox中的值,我们可以在动态加载页面时再设置TextBox的只读属性为"True"
if (!IsPostBack)
{
this.txtItemStartTime.Attributes.Add("readonly", "true");
}
设置TextBox ReadOnly属性
本文介绍如何在使用CalendarExtender控件时,通过设置TextBox的ReadOnly属性来实现对TextBox中值的获取。具体做法是在页面动态加载时判断是否为回发状态,如果不是,则将TextBox设置为只读。
1212

被折叠的 条评论
为什么被折叠?



