0

I have an old website that displays content from umbraco per page. This is done by using a pageload to call a webservice and render umbraco html content to a literal control. i.e.

HttpWebRequest request = (HttpWebRequest)WebRequest.Create("http://111.111.111.111:8080/api/PageContentApi?id=1122");
        HttpWebResponse response = (HttpWebResponse)request.GetResponse();
        if (response.StatusCode == HttpStatusCode.OK)
        {
            Stream stream = response.GetResponseStream();
            using (StreamReader reader = new StreamReader(stream))
            {
                string html = reader.ReadToEnd();
                aboutText.Text = html;
            }
        }

How would I accomplish this same rendering but in a MVC way for a hot towel spa application. How should this be structured per view when a single page application is designed to load most content at start?

4

1 回答 1

0

我不确定你是否已经解决了这个问题。但是,我处于类似情况并使用了 Umbraco Library 的 RenderTemplate 函数。我正在使用 Umbraco 6.1.3

于 2013-08-05T13:33:30.747 回答