Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Smart EditorFor
Message
Information générale
Forum:
ASP.NET
Catégorie:
MVC
Titre:
Versions des environnements
Environment:
C# 4.0
OS:
Windows 7
Network:
Windows 2003 Server
Database:
MS SQL Server
Divers
Thread ID:
01560391
Message ID:
01560416
Vues:
43
>>If I type ViewData. I don't get any intellisense, unfortunately :( I am wondering, is there a way to find the type of my model property in this code and if it's numeric type, I want to use my special numeric only textbox class (and input type = "number" - HTML5).
>>
>>I got this idea http://stackoverflow.com/questions/13984602/how-to-make-entry-field-to-allow-numbers-only-using-ef-and-data-annotations and that's what I was thinking yesterday night also myself, but if I can make this EditorFor smarter, I would not need a UIHint.
>>
>>Do you know if this is a doable idea or I should go with a separate Editor? Also, in case of the later idea, how can I use input type="number" instead of @Html.TextBox
>>
>
>Take a look here for the available properties:
>
>http://msdn.microsoft.com/en-us/library/system.web.mvc.modelmetadata(v=vs.108).aspx
>
>Maybe DataTypeName?
>
>For input type="number" you would just put that in your template and not use the built-in helper for @Html.
>
>Or, use a library like this which adds new helpers:
>
>http://mvchtml5.codeplex.com/

Paul,

Thanks a lot. I hope to look into it during this weekend.
If it's not broken, fix it until it is.


My Blog
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform