疯狂的米饭  

2011年2月16日

摘要: asp控件在页面里只能用指定CssClass来指定样式。 后台就用 1、Button1.Style.Add(HtmlTextWriterStyle.Color,"red"); 2、Button1.Style.Add("color","red"); 3、Button1.Attributes.Add("style","color:red;"); 阅读全文
posted @ 2011-02-16 11:37 疯狂的米饭 阅读(250) 评论(0) 推荐(0)
 
摘要: 1.Asp.Net中几种相似的标记符号: < %=...%>< %#... %>< % %>< %@ %>解释及用法答: < %#... %>: 是在绑定控件DataBind()方法执行时被执行,用于数据绑定如: < %# Container.DataItem("tit") %>< %= %>: 在程序执行时被调用,可以显示后台变量值如:*.aspx中: < %= aaa %>*.cs中: protected string aaa="姓名";< % %>: 内联代码块里面可以在页面文件* 阅读全文
posted @ 2011-02-16 10:16 疯狂的米饭 阅读(75) 评论(0) 推荐(0)