c# - MVC Dynamic Controller -


i have mainview calling action return partial view such

html.renderaction("getupperpanel","general"); 

within generalcontroller have function return different view depending on condition. each view in different controller.

public actionresult getupperpanel()     {         return view("../accounttypes/accounttypesupper",new accounttypescontroller().getgriddata());     } 

this working currently, partial views trying display in view returned don't seem work. in account type view have following.

 @html.partial("uppergridpartial"); 

this errors saying view cannot found, looks mvc looking in generalcontroller views rather accounttypes located.

i presuming because getupperpanel in general thinks controller, though returning view accounttypes controller.

how should doing this?


Comments

Popular posts from this blog

php - How to display all orders for a single product showing the most recent first? Woocommerce -

asp.net - How to correctly use QUERY_STRING in ISAPI rewrite? -

angularjs - How restrict admin panel using in backend laravel and admin panel on angular? -