Partial View in plugin

This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.
11 năm cách đây
I like to have a partial view in my plugin, something like:


@Html.Partial( "Nop.Plugin.Something.Something.Views.Something._ProductBox" , @item )


Won't work (gives an error about not finding '_ProductBox' when searching ~/Themes, ~/Views, ~/Administration etc)

For now I can work around this by not using a partial but calling an action, like this:


@Html.Action( "ActionName", "ControllerName" )


But I rather use partial views, anybody knows how to accomplish this?

tia,
KJ
11 năm cách đây
Have you marked your view as "Embedded Resource"? You need to do that. :P
11 năm cách đây
The view was marked as embedded resource but I "solved" it this morning when I rebooted my computer and rebuild the solution (I probably forgot to clean the solution before rebuilding yesterday) Thanks anyway
Cheers,
KJ
11 năm cách đây
wooncherk wrote:
Have you marked your view as "Embedded Resource"? You need to do that. :P


How to mark view as "Embedded Resource"?
11 năm cách đây
goto the properties of the view and set build action to "embedded Resource"
This topic was automatically closed 365 days after the last reply. New replies are no longer allowed.