有一个控件TextBox1
<asp:TextBox id="TextBox1" runat="server" style="width:100px;heigth:100px"></asp:TextBox>在服务器端 怎么取得TextBox1的style属性值"width:100px;heigth:100px"请大家指点!

解决方案 »

  1.   


    TextBox1.Style["width"]
    TextBox1.Style["heigth"]
      

  2.   

    先谢两位
    To:XIEWH() ( ) 
    我试了 好像不行To:net_lover(【孟子E章】)
    不仅只是 width 和 heigth两个值 
    有几个我也不知道 不能固定
    =================
    请大家继续执教!
      

  3.   

    那就TextBox1.Style.Value全取出来.....
      

  4.   

    先谢XIEWH() ( )回复
    没有 value属性
    有Tostring() 但也不是想要的 
      

  5.   

    foreach (string sKey in this.TextBox1.Style.Keys)
            {
                Response.Write(sKey + ":" + this.TextBox1.Style[sKey] + "<BR>");
            }