Click here to Skip to main content
15,498,623 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
Hi Team

I am creating a web form using asp.net mvc and using bootstrap input-group mb-3. But the size to allow edit for Title is too big and want way that fits it to be normal. Below is my logic of my form, but i need some adjustment, please assist me to achieve this better.

What I have tried:

C#
<pre>    <div class="register-box">
               <div class="register-logo">

               </div>
           </div>
           <div class="card">
               <div class="card-body register-card-body">
                   <center>
                       <img src="~/Images/eNtsa.png" />
                   </center>
                   <center>
                       <p>Training Course Registration:Motion MasterClass</p>
                   </center>

                   @using (Html.BeginForm("editRegForm", "Home", FormMethod.Post, new { @role = "form" }))
                   {
                       @Html.AntiForgeryToken()
                       <div class="input-group-mb-2">
                           @Html.TextBoxFor(m=>m.Title, new {@class = "form-control", type = "text", id = "title", autofocus = "autofocus", placeholder = "Title", required = "required"})
                               <div class="input-group-text">
                                   
                               </div>
                           
                       </div>
                   }

               </div>
           </div>
Posted
Updated 15-Mar-20 23:00pm

1 solution

Hi Team

Maybe if my question sounded so unclear, my aim was to get the form to be on the center including the text input of the form. See my logic in doing this below.

@using eNtsaRegistrationTraining.Models
@model EditTrainingRegFormViewModel

@{
    ViewBag.Ttile = "Dashboard";
    Layout = "~/Views/Shared/_HomeLayout.cshtml";
}
<center>
    <div class="register-box ">
        <div class="register-logo">

        </div>

        <div class="card">
            <div class="card-body register-card-body">
                <center>
                    <img src="~/Images/eNtsa.png" />
                </center>
                <center>
                    <p>Training Course Registration:Motion MasterClass</p>
                </center>

                @using (Html.BeginForm("editRegForm", "Home", FormMethod.Post, new { @role = "form" }))
                {
                    @Html.AntiForgeryToken()

                    <div class="input-group mb-3">
                        @Html.TextBoxFor(m => m.Title, new { @class = "form-control", type = "text", id = "title", autofocus = "autofocus", placeholder = "Title", required = "required" })
                        <div class="input-group-append">
                            <div class="input-group-text">

                            </div>
                        </div>

                    </div>
                }

            </div>
        </div>
</center>
           </div>
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900