Ho una vista ASP.NET MVC molto semplice che ha un semplice string
come modello.EditorFor (..) genera un'eccezione quando il mio modello è nullo nella mia applicazione ASP.NET MVC
es.
@model string
Quando faccio il seguente, la vista genera un'eccezione, se il valore del modello è null
(che si verifica quando le prime terre utente su questo punto di vista/page/risorsa).
Value cannot be null or empty.
Parameter name: name
Description: An unhandled exception occurred during the execution of the
current web request. Please review the stack trace for more
information about the error and where it originated in the code.
Exception Details: System.ArgumentException: Value cannot be null or empty.
Parameter name: name
<td>@Html.EditorFor(model => model)</td>
Come si crea un input box
usando EditorFor(..)
quando il valore della stringa modello è nullo?
Non è possibile. Quale nome otterrebbe il campo nella forma? – bzlm