Copied to clipboard

Flag this post as spam?

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


  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Apr 28, 2012 @ 11:27
    Biagio Paruolo
    0

    JSON data e template

    Hi, I wish to return data from database or a class and present to page via JSON or webservice.

    So, I create a class and a razor script with JSON.write to output data and put a macro into a template:

    <%@ Master Language="C#" MasterPageFile="~/umbraco/masterpages/default.master" AutoEventWireup="true" %>

    <umbraco:Macro Alias="Red/HelpersLib" runat="server"></umbraco:Macro>

    I call http://red-web-umbraco/Demo ( Demo is the template name ) but I've 404 error. Why?

    Which is the best method to return JSON/Webservice data from a class?

    Thanks

     

  • jaygreasley 416 posts 403 karma points
    Apr 28, 2012 @ 12:39
    jaygreasley
    0

    Hi,

    Seb has some useful ideas on his blog about this including - http://cultiv.nl/blog/2012/1/9/using-areas-in-umbraco-5-to-replace-base/

    Jay

  • Biagio Paruolo 1619 posts 1912 karma points c-trib
    Apr 28, 2012 @ 12:47
    Biagio Paruolo
    0

    Hi, I already read that. Why Have I 404 error?

Please Sign in or register to post replies

Write your reply to:

Draft