Link to home
Start Free TrialLog in
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?
ASKER CERTIFIED SOLUTION
Avatar of chaau
chaau
Flag of Australia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial