Avatar of brgdotnet
brgdotnet
Flag for United States of America asked on

Types of HTML text boxes when using MVC with .Net

I have two different text boxes below. I am under the impression that they are both HTML text boxes. I am using Microsoft.net,
and MVC with C#.

I want to place these text boxes in a partial view. I have noticed that the <input type ...> text box when used as a partial view will be displayed in every .cshmtl page in the project, and the other text box type @Html will display in only the .cshtml page that uses the partial view. Which text box type is better, and why does one show on all of the .cshtml pages, and the other only on one?


  <div style="padding-left:19px; width:806px;">
        @Html.TextBox("PartialTextBox", "", new { style ="width: 100px;", id="partialBox" })

        <input type="text" name="customer" id="newCust" value="">
    </div>
.NET Programming

Avatar of undefined
Last Comment
brgdotnet

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
Reece Cottam

THIS SOLUTION ONLY AVAILABLE TO MEMBERS.
View this solution by signing up for a free trial.
Members can start a 7-Day free trial and enjoy unlimited access to the platform.
See Pricing Options
Start Free Trial
GET A PERSONALIZED SOLUTION
Ask your own question & get feedback from real experts
Find out why thousands trust the EE community with their toughest problems.
brgdotnet

ASKER
Pretty awesome answer. Thanks.
Your help has saved me hundreds of hours of internet surfing.
fblack61