2009年10月21日

根据DropDownList的控件的显示文本选中指定项

摘要: 使用ASP.NET中的DropDownList控件赋值时,大多数时候的用法为:DropDownList1.SelectedValue = value;可是如果要根据显示文本来确定控件的选中项时如何用呢?DropDownList1.Text = text;实际使用中,这个方法是不行的。应该这样:DropDownList1.SelectedValue = DropDownList1.Items.Fin... 阅读全文

posted @ 2009-10-21 09:23 alon 阅读(717) 评论(0) 推荐(0) 编辑

c# 数据类型转换

摘要: doublie TO int double d=5.0; int i = Convert.ToInt32(d);decimal TO int decimal d = 6.65M; int i = Convert.ToInt32(d);stringTO int string s = "5.65"; int i = Convert.ToInt32(double.Parse(s)); 阅读全文

posted @ 2009-10-21 09:19 alon 阅读(129) 评论(0) 推荐(0) 编辑

导航