I’m working with MVC3 with Razor for first time, and I have a partial view which is used in many other places and has no model. And now I need it, can I create an optional model? If it is passed, then I’ll use it, otherwise I’ll leave the default behavior.
[Update]
I’d like to call it like this:
@Html.Partial("_myPartialView")
or this:
@Html.Partial("_myPartialView", "Some string")
(the partial view model is a string)
Is this possible?
UPDATE:
After showing the way you are calling your partial, here’s what you could do: