Murray Brown
asked on
ASP.net How do I get the width of an input box and a GridView column to match
Hi. In my ASP.net web app I am trying to get the width of an input box and a GridView template column. The two do not look the same size.
What might I be doing wrong. The markup code for them is shown below
What might I be doing wrong. The markup code for them is shown below
<input id="TotalWeight2" runat="server" type="text" placeholder="To" class="auto-style8" style="font-size: medium; width:75px"/>
<asp:TemplateField HeaderText="Total Weight" SortExpression="Total Weight" ItemStyle-HorizontalAlign="Left" ItemStyle-Wrap="true" >
<ItemTemplate>
<asp:Label ID="lblTotalWeight" runat="server" Text='<%# Bind("[Total Weight]")%>' Width="75" ></asp:Label>
</ItemTemplate>
</asp:TemplateField>
similar for your text input, what if applied width=100% ?
ASKER
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thanks very much. Sorry about late acceptance
<asp:Label ID="lblTotalWeight" runat="server" Text='<%# Bind("[Total Weight]")%>' Width="100%" ></asp:Label>