Copied to clipboard

Flag this post as spam?

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


  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 03, 2013 @ 14:13
    Ismail Mayat
    0

    Datatype grid in class

    Guys, In razor i am working with data type grid as follows

     var answerXml = Library.ToDynamicXml(question.GetPropertyValue(DocumentType.Questions.Question.Answers));
    

    I can then do foreach (var answer in answerXml) {

    answer.answer.InnerText

    I am in a class and want to know best way of doing something similar. I cannot use Library in class is there a way of doing this?

    Regards

    Ismail

  • Ismail Mayat 4511 posts 10092 karma points MVP 2x admin c-trib
    Aug 05, 2013 @ 10:58
    Ismail Mayat
    100

    In answer to my own question,

    var lib = new umbraco.MacroEngines.Library.RazorLibraryCore(questionNode);
    var answerXml = lib.ToDynamicXml(questionNode.GetProperty<string>(DocumentType.Questions.Question.Answers));
    
Please Sign in or register to post replies

Write your reply to:

Draft