Rendering macros and partial views with anonymous/various objects parameters
Hi
I'd like to render macro with dynamic/anonymous argument which can have difference type depends on using. Mostly these types can't be selected from available types of macro arguments so please for help how can I do that, and how can I access this object inside macro.
Hi, What you need is IOC using something like unity? Do you have pluralsight?
I am can give you a basic idea if you like :).
Basically what you will end up with is being able to pass any model to your view / partial view that inherits from the interface you have specified in the config.
Rendering macros and partial views with anonymous/various objects parameters
Hi
I'd like to render macro with dynamic/anonymous argument which can have difference type depends on using. Mostly these types can't be selected from available types of macro arguments so please for help how can I do that, and how can I access this object inside macro.
The similar solution will be very helpful for me when render partial views, where argument and Model in partial view is dynamic.
I tried solutions from other posts in this forum, but nothing works for me.
Please for Help, Adrian
Hi, What you need is IOC using something like unity? Do you have pluralsight?
I am can give you a basic idea if you like :).
Basically what you will end up with is being able to pass any model to your view / partial view that inherits from the interface you have specified in the config.
Charlie
is working on a reply...