Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
1.2k views
in Technique[技术] by (71.8m points)

twitter bootstrap 3 - ASP.Net WebForms Multiline Textbox Ignores Width

I have the following code

<div class="form-horizontal">
      
        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="TextBox1"
                CssClass="col-md-2 control-label">Label1</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="TextBox1" CssClass="form-control" />
            </div>
        </div>

        <div class="form-group">
            <asp:Label runat="server" AssociatedControlID="TextBox2"
                CssClass="col-md-2 control-label">Label2</asp:Label>
            <div class="col-md-10">
                <asp:TextBox runat="server" ID="TextBox2" CssClass="form-control" 
                     TextMode="MultiLine" />
            </div>
        </div>
    </div>

which produces the following result:

textbox2 ignores responsive design

if you notice the textbox2 ignores responsive design (width), I found out this is because of the TextMode = "MultiLine" property. The textbox1 is exactly the same only without the TextMode property and it respects the responsive design. Don't you know how I can fix this issue by keeping the design responsive? The easiest way would be to give it a fixed width (width = "500px"), but it is not the most elegant solution and it is not responsive design, and if the device on which it is viewed (tablet or cell phone) is less than that width, it does not adjust it. Any help would be of great use. Thank you

question from:https://stackoverflow.com/questions/66060628/asp-net-webforms-multiline-textbox-ignores-width

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Answer

0 votes
by (71.8m points)
Waitting for answers

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome to OStack Knowledge Sharing Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

2.1m questions

2.1m answers

60 comments

57.0k users

...