当前位置: 代码迷 >> ASP.NET >> 服务器端取得style(在线求解!)解决方法
  详细解决方案

服务器端取得style(在线求解!)解决方法

热度:779   发布时间:2013-02-26 00:00:00.0
服务器端取得style(在线求解!!)
有一个控件TextBox1
<asp:TextBox   id= "TextBox1 "   runat= "server "   style= "width:100px;heigth:100px "> </asp:TextBox>

在服务器端   怎么取得TextBox1的style属性值 "width:100px;heigth:100px "

请大家指点!

------解决方案--------------------------------------------------------
TextBox1.Style不行么?
------解决方案--------------------------------------------------------

TextBox1.Style[ "width "]
TextBox1.Style[ "heigth "]
------解决方案--------------------------------------------------------
foreach (string sKey in this.TextBox1.Style.Keys) { Response.Write(sKey + ": " + this.TextBox1.Style[sKey] + " <BR> "); }
------解决方案--------------------------------------------------------
友情UP
  相关解决方案