2
Answers

Make a title of the field goes over the field: asp MVC/Razor

thabet idris

thabet idris

5y
740
1
Hi,

I want when I enters information in the field, then the title of the field goes over the field.

Here is my code:
 
so in the field we have the text "FIRSTNAME", my purpose is when i enters information in this field, the text "FIRSTNAME" goes over the field.

And as long as the client has nothing to enter in a field, then the title remains in the field.

I search a lot if there is a trick to add in TextBoxFor to do that but i didn't find!
 
state initial : 
 
state final: 
 


Thanks a lot 
 
  1. @Html.TextBoxFor(model => model.FirstName, new { @placeholder = "FIRSTNAME", @class = "adresse-input"})  
Answers (2)