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
    Mar 31, 2012 @ 08:54
    hetaurhet
    0

    using umbraco in naother web App

    Hello

    I have web site in umbraco 4.7.1.

    I want to use come of its pages in another web application. So can I do that?

    What I know is I can add refrences of Dlls required and use node factory to extract properties. But do I need to add umbraco DB refrence in web.config? or what steps I need to do? Say I am trying very simple code as below.

    using System;
    using System.Collections.Generic;
    using System.Linq;
    using System.Web;
    using System.Web.UI;
    using System.Web.UI.WebControls;
    using umbraco.MacroEngines;
    using umbraco.NodeFactory;
    using umbraco.interfaces;

    namespace contact_us
    {
        public partial class contact_us : System.Web.UI.Page
        {
            protected void Page_Load(object sender, EventArgs e)
            {
                Node node = Node.GetNodeByXpath(string.Format("//*[@id='{0}']","1595"));

                foreach (INode n in node.Children)
                {
                    Response.Write(n.Name+ "<br />" );
                }
            }
        }
    }

    But this .aspx page will be hosted on another website. So, how can I access umbraco content nodes?

  • hetaurhet 245 posts 267 karma points
    Apr 01, 2012 @ 17:48
    hetaurhet
    0

    any help on this?

    Is this possible this way?

     

Please Sign in or register to post replies

Write your reply to:

Draft