Razor @Html.Raw()的作用
摘要:@Html.Raw()的作用 @Html.Raw() 方法输出带有html标签的字符串,如:@Html.Raw("<div style='color:red'>红字</div>")结果:红字 如果不用,则会输出:<div style='color:red'>红字</div>
阅读全文
posted @
2020-03-25 17:46
龙族少年
阅读(511)
推荐(0)
LINQ语句中的.AsEnumerable() 和 .AsQueryable()的区别
摘要:在写LINQ语句的时候,往往会看到.AsEnumerable() 和 .AsQueryable() 。例如: string strcon = "Data Source=.\\SQLEXPRESS;Initial Catalog=Db_Example;Persist Security Info=Tru
阅读全文
posted @
2020-03-25 17:45
龙族少年
阅读(349)
推荐(0)
DEV控件
摘要:1、设置Gridview控件的某列是否可编辑(CUser:数据库字段) this.gdv.Columns["CUser"].OptionsColumn.AllowEdit = false; 2、设置Gridview控件整体不可编辑 或者this.gdv.OptionsBehavior.Editabl
阅读全文
posted @
2020-03-25 17:43
龙族少年
阅读(558)
推荐(0)
字符串位数补足
摘要:string str="2";str.PadLeft(4, '0'); //结果为为 '0002'; string str="2";str.PadRight(4, '0'); //结果为为 '2000';
阅读全文
posted @
2020-03-25 17:42
龙族少年
阅读(386)
推荐(0)