Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Hi,
I have a an issue with rendering my partial view. I get no errors, I dont see the content of my partial view.
I call the Action in my template (example.cshtml)
@{Html.Action("RenderExample", "ExampleSurface");}
afterwards the Actions is called correctly (i logged it into a file)
public ActionResult RenderExample(ExampleModel model) { try { return PartialView(PARTIAL_VIEW_FOLDER + "_Example.cshtml", model); } catch (Exception) { throw ; } }
This is the partialview "_Example.cshtml"
@inherits UmbracoViewPage<ExampleProject.App_Code.Models.ExampleModel > <div>Here should be the html </div>
Finally, I found the solution. I need to call RenderAction instead of Action
@{Html.RenderAction("RenderExample", "ExampleSurface");}
Hi Nadine
I think you are 'writing out' the output of the surface controller inside a code block! so it never appears...
try:
@Html.Action("RenderExample", "ExampleSurface")
instead
regards
Marc
ha Nadine
I was too late! my a microsecond...
but yes calling RenderAction inside the code block is the other option...
:) Really funny! Thanks anyway for your advice, Marc :)
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
PartialView doesnt render after calling SurfaceController
Hi,
I have a an issue with rendering my partial view. I get no errors, I dont see the content of my partial view.
I call the Action in my template (example.cshtml)
afterwards the Actions is called correctly (i logged it into a file)
This is the partialview "_Example.cshtml"
Finally, I found the solution. I need to call RenderAction instead of Action
Hi Nadine
I think you are 'writing out' the output of the surface controller inside a code block! so it never appears...
try:
instead
regards
Marc
ha Nadine
I was too late! my a microsecond...
but yes calling RenderAction inside the code block is the other option...
regards
Marc
:) Really funny! Thanks anyway for your advice, Marc :)
is working on a reply...