Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Renderaction on _layout.chtml #14

Open
tassadaque opened this issue Feb 21, 2012 · 1 comment
Open

Renderaction on _layout.chtml #14

tassadaque opened this issue Feb 21, 2012 · 1 comment

Comments

@tassadaque
Copy link

I am trying to call a partial page on layout page. but the layout page get rendered multiple times. Just add the following line on layout page and bug can be reproduced

@{ Html.RenderAction("CurrentDateTime", "Home"); }

@ghost
Copy link

ghost commented Apr 18, 2012

This sounds like a setup issue rather than anything Moth does. Is your partial implemented like this in the controller (especially, returning a PartialView()):

    [ChildActionOnly]
    public ActionResult CurrentDateTime()
    {
        return PartialView();
    }

Also check that your view does not have Layout="xxx" near the top, where xxx is the path to your _layout.cshtml

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant