I've got a really simple ASP.NET MVC View which has a simple string
as the model.
eg.
@model string
When I do the following, the view throws an exception, if the model value is null
(which occurs when the user first lands on this view/page/resource).
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>
How can I create an input box
using EditorFor(..)
when the string-model value is null?