Home How to write razor query to display two fields side by side?

How to write razor query to display two fields side by side?

user1768
1#
user1768 Published in June 20, 2018, 1:29 am
 I am dynamically generating the fields using a foreach loop. I have several conditions on rendering those fields. There is one condition where on it being true, there are two fields that should be rendered side by side on the same row. I tried every possible approach but it isn't getting rendered as I want. I can't use 
of as it will display the fields on separate lines. So, how should I write the razor query combined with bootstrap's code such that I have two fields side by side. Here is my current code: @foreach (var d in data) { if (Condition1) {
@Html.TextBox("Box1")
} else if(Condition 2) {
@Html.TextBox("Box2")
} else if(Condition3) {
@{ @Html.TextBox("Box2") }
} }  Condition 3 is where I want to render those 2 fields This is my current state: check position of horsepower or rpm
 You need to login account before you can post.
Processed in 0.320471 second(s) , Gzip On .