Copied to clipboard

Flag this post as spam?

This post will be reported to the moderators as potential spam to be looked at


  • hetaurhet 245 posts 267 karma points
    Feb 10, 2012 @ 14:54
    hetaurhet
    0

    calling razor script

    hello

    can we call a razor script inside another razor script? If yes, then how to do that?

  • Douglas Ludlow 210 posts 366 karma points
    Feb 10, 2012 @ 15:47
    Douglas Ludlow
    0

    Yes, it's quite easy in fact. You can do it by calling the RenderPage method:

    @RenderPage("~/macroScripts/scriptYouWantToRun.cshtml")

    If you'd like to pass parameters to it you could use Page properties:

    Page.NewsItem = Model.newsItem;

    Hope that helps!

  • saif 68 posts 88 karma points
    Feb 14, 2012 @ 10:41
    saif
    0

    Hi Douglas,

    I have posted the same question please have a look.

    http://our.umbraco.org/forum/developers/razor/28482-Render-Control-on-cshtml-page 

    Please help this is really urgent.

     

Please Sign in or register to post replies

Write your reply to:

Draft