lundi 29 juin 2015

How to pass Parameter to a partial view: Object reference not set to an instance of an object

I have a partial view that renders one control on the page, this control is for certain fields that are long. This is how I defined it:

@model long
@(Html.Kendo().MultiSelectFor(x => Model)

I'm trying to render this partial view in other views with something like:

@Html.Partial("MultiSelect/partialView", @Model.longField)

This give me an Object reference not set to an instance of an object exception.

Please guide me about the right syntax to achieve this.

Aucun commentaire:

Enregistrer un commentaire