Go to the documentation of this file.00001 using System;
00002 using System.Collections;
00003 using System.Web;
00004 using System.Web.Mvc;
00005 using N2.Web.UI;
00006 using N2.Web.Mvc.Html;
00007
00008 namespace N2.Web.Mvc
00009 {
00010 [Obsolete("Name changed to ContentViewPage")]
00011 public class N2ModelViewPage<TModel, TItem> : ContentViewPage<TModel, TItem>, IItemContainer<TItem>
00012 where TModel : class
00013 where TItem : ContentItem
00014 {
00015 #region IItemContainer<TItem> Members
00016
00017 public TItem CurrentItem
00018 {
00019 get { return Content; }
00020 set { Content = value; }
00021 }
00022
00023 #endregion
00024
00025 public override void RenderView(ViewContext viewContext)
00026 {
00027 ViewContext = viewContext;
00028 InitHelpers();
00029 ID = Guid.NewGuid().ToString();
00030
00031 var response = new HttpResponse(viewContext.HttpContext.Response.Output);
00032 var context = new HttpContext(HttpContext.Current.Request, response) { User = viewContext.HttpContext.User };
00033 foreach (DictionaryEntry contextItem in viewContext.HttpContext.Items)
00034 {
00035 context.Items[contextItem.Key] = contextItem.Value;
00036 }
00037
00038 ProcessRequest(context);
00039 }
00040 }
00041 }