Reputation: 1115
i'm trying to wrap a textbox but i'm getting that word-wrap is not a know css property name and it's not working so how can i fix it?
<asp:TemplateField HeaderText="cnt_content">
<EditItemTemplate>
<asp:TextBox ID="cnt_content" runat="server" Text='<%# Bind("cnt_content") %>' wrap="true" TextMode="MultiLine"></asp:TextBox>
</EditItemTemplate>
<ItemTemplate>
<asp:Label ID="cnt_content" runat="server" Text='<%# Bind("cnt_content") %>'></asp:Label>
</ItemTemplate>
<ItemStyle Width="800px" wrap="true" />
</asp:TemplateField>
note that my textbox is in a gridview and i'm working on asp.net using vb.net
Upvotes: 0
Views: 6183
Reputation: 3740
Upvotes: 1
Reputation: 3256
Why not using asp.net's own TextBox
WordWrap
property.
<asp:TextBox Wrap="True|False" />
TextMode
property to "Multiline
"
Its working for me
Upvotes: 0
Reputation: 78
Don't worry, Visual Studio does not understand word-wrap property for Div.So it gives you green line.! So run your page & see output with <div style="word-wrap:break-word;">
Upvotes: 0