This is a migrated thread and some comments may be shown as answers.

Input Group

1 Answer 464 Views
TextBox
This is a migrated thread and some comments may be shown as answers.
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
DoomerDGR8 asked on 05 Oct 2020, 07:30 PM

How can I have two or more TextBoxes in same line?

<div class="form-group row">
    @Html.LabelFor(m => m.MobileNumber, new { @class = "col-sm-2 col-form-label" })
    <div class="col-sm-4">
        @Html.TextBox("MobileNumberPrefix", "+9715", new { @class = "k-textbox", style = "width: 28%;", @readonly = "readonly" })
        @Html.TextBoxFor(m => m.MobileNumber, new { maxlength = "8", @class = "k-textbox", style = "width: 100%;", placeholder = "9715XXXXXXXX" })
    </div>
    @Html.LabelFor(m => m.UserEmail, new { @class = "col-sm-2 col-form-label" })
    <div class="col-sm-4">
        @Html.TextBoxFor(m => m.UserEmail, new { maxlength = "150", @class = "k-textbox", style = "width: 100%;", placeholder = "Email Address" })
    </div>
</div>

 

I want to show MobileNumberPrefix and MobileNumber together in the col-sm-4

1 Answer, 1 is accepted

Sort by
0
Accepted
Anton Mironov
Telerik team
answered on 07 Oct 2020, 01:55 PM

Hi, Hassan,

Thank you for the provided code snippet. In general, the two TextBoxes are in one line when they are positioned in the same div element as in the example.

Find attached a sample project along with an image that describes the behavior at my side.

Let me know if this is the desired result or there are other requirements as well. 

Kind Regards,
Anton Mironov
Progress Telerik

Virtual Classroom, the free self-paced technical training that gets you up to speed with Telerik and Kendo UI products quickly just got a fresh new look + new and improved content including a brand new Blazor course! Check it out at https://learn.telerik.com/.

Tags
TextBox
Asked by
DoomerDGR8
Top achievements
Rank 2
Iron
Iron
Iron
Answers by
Anton Mironov
Telerik team
Share this question
or