Avatar of maqskywalker
maqskywalker
 asked on

passing textbox value to a label in mvc

Hi experts,

I'm using Visual Studio 2013, ASP.NET MVC 5, C#, Razor, Sql Server 2008, Entity Database First model Entity Framework 6.

So I have a view page called Create.cshtml

I have a form on this view.

On my form i have a textbox that is using this code:

@Html.TextBoxFor(model => model.LastName, new { id = "UserLastName", @class = "FormTextBoxStyle", @placeholder = "" })


Further down this same page I want to have  a label.
So when I type a value inside this textbox, the value I typed in this textbox displays on the label.

Is there a way to pass the value I typed in my above text to a label using either  @Html.Label  or @Html.LabelFor  html helpers?
ASP.NET

Avatar of undefined
Last Comment
chaau

8/22/2022 - Mon
ASKER CERTIFIED SOLUTION
chaau

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.
This is the best money I have ever spent. I cannot not tell you how many times these folks have saved my bacon. I learn so much from the contributors.
rwheeler23