Copied to clipboard

Flag this post as spam?

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


  • Mark Evans 86 posts 116 karma points
    Sep 15, 2014 @ 09:35
    Mark Evans
    0

    nested razor code

    im having problems trying to get a block of code to run properly....

    i have an opening and closing razor tag, but once i hit a section of code,  the tags no longer match up and code appears as text. i use other razor code tags to wrap this section but can never get the tags enclosing the whole block of code to match.

    one problem line is this

    int widgetWidth = Convert.ToInt32(widget.GetPropertyValue<IPublishedContent>("widgetWidth"));

    element ipublishedcontent is not supported, if i use &lt; &gt; it expects brackets, which still do not work.

    whats the best approach for wrapping code within more than one foreach loop?

     

  • Jeavon Leopold 3074 posts 13632 karma points MVP 11x admin c-trib
    Sep 15, 2014 @ 09:53
    Jeavon Leopold
    0

    Unless you are using a value converter this line should be:

    int widgetWidth = widget.GetPropertyValue<int>("widgetWidth");
    
Please Sign in or register to post replies

Write your reply to:

Draft