开发者

Use select List Item in razor in mvc3

I'm going to use select list item in razor and it开发者_StackOverflow社区 gives this error:

"Element 'Selectlistitem' its not supported "

@List s = sfc2.MVC.ViewModels.Category.MajorCategories();


First of all, your razor syntax is wrong. If it is a void then you'd have to use it in @{}, e.g.:

@{List s = sfc2.MVC.ViewModels.Category.MajorCategories();}

and second, yeah you should provide more code.

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜