partial view macro file load view but surface controller does not execute Index method on page load
Hi all,
I have asked this question few times on different ways , I haven't got any answer.
I have build a visual studio project with umbraco dlls and created a surface controllers for two three forms and data display grid from another external data source.
In login controller , Index method look for values on login request and pass customize message to end user with login form. another controller Index method read data from external data source and display in a table.
both views hit Index method if i call them in Template using Html.Action method. but if I use macro view partial file and use renderpartial to load views and then insert macro in a content page using RTE (rich text editor) that does not hit index method i get blank view.
How do I approach Index method if i am using macro ?
please send me your ideas , would be a great help.
Then when you insert this macro into a rich text area, the surface controller action is hit and renders the result within the macro and the template, in this example...
partial view macro file load view but surface controller does not execute Index method on page load
Hi all, I have asked this question few times on different ways , I haven't got any answer.
I have build a visual studio project with umbraco dlls and created a surface controllers for two three forms and data display grid from another external data source.
In login controller , Index method look for values on login request and pass customize message to end user with login form. another controller Index method read data from external data source and display in a table.
both views hit Index method if i call them in Template using Html.Action method. but if I use macro view partial file and use renderpartial to load views and then insert macro in a content page using RTE (rich text editor) that does not hit index method i get blank view.
How do I approach Index method if i am using macro ?
please send me your ideas , would be a great help.
Hi Pat
I think you still need to use Html.Action to render the controllers within your Macro Partial.
eg
If your surface controller is like so:
and then
in your Macro you have a Macro Partial
Then when you insert this macro into a rich text area, the surface controller action is hit and renders the result within the macro and the template, in this example...
is working on a reply...