itemstyle-width在chrome中不起作用,在IE中工作

时间:2012-11-01 12:27:06

标签: c# asp.net internet-explorer firefox google-chrome

我使用以下方法在asp gridview中创建标签。如果我这样使用,文字会出现在IE的标签中,但在ChromeFireFox中,文字会出现在grid-view的外面吗?
如何解决这个问题?

<asp:TemplateField HeaderText="text" itemstyle-width="100px" >                                              
      <ItemTemplate>
          <asp:Label ID="lbl" runat="server"  Text='There is no null-terminating character at the end of a C# string; therefore a C# string can contain ... of s1 and s2 are concatenated to form a single string, the two original strings are unmodified. ... For more information about how to create new strings that are based on modifications ... string quote Regex pattern strings are also interpreted at runtime, like string.Format(...). The Regex syntax contains instructions that are introduced by \. E.g. \d stands for a single character from the set 0...9. I dnt go into the Regex syntax in this tip, but rather how to conveniently put such a Regex pattern into a C# string.'></asp:Label>
      </ItemTemplate>
</asp:TemplateField>    

1 个答案:

答案 0 :(得分:0)

更改     itemstyle宽度= “100px的” 至     style =“width:100px;”