<?xml version="1.0" encoding="utf-8"?>
<rss xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title>Emad Ibrahim - Latest Comments in Ajax with ASP.NET MVC Framework Preview 2</title><link>http://emadibrahim.disqus.com/</link><description></description><atom:link href="https://emadibrahim.disqus.com/ajax_with_aspnet_mvc_framework_preview_2/latest.rss" rel="self"></atom:link><language>en</language><lastBuildDate>Tue, 27 May 2008 09:13:39 -0000</lastBuildDate><item><title>Re: Ajax with ASP.NET MVC Framework Preview 2</title><link>http://www.emadibrahim.com/2008/03/31/ajax-with-aspnet-mvc-framework-preview-2/#comment-1601704</link><description>&lt;p&gt;@Pieter: thanks for sharing your findings&lt;br&gt;@Christian: I am not sure what is going on here.  I personally never used ContainsDataItem method on ViewData because I always used a typed ViewData.&lt;/p&gt;&lt;p&gt;I have a BaseViewData that is used on the master page and every page using that master and then I create derived classes for ViewData for each page e.g. UserInfoViewData, etc...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Emad Ibrahim</dc:creator><pubDate>Tue, 27 May 2008 09:13:39 -0000</pubDate></item><item><title>Re: Ajax with ASP.NET MVC Framework Preview 2</title><link>http://www.emadibrahim.com/2008/03/31/ajax-with-aspnet-mvc-framework-preview-2/#comment-1601703</link><description>&lt;p&gt;Thanks for the update, also thank to Pieter, but I still have problems with the RenderPartialCore method, like Pieter says when calling the RenderPartial method on a UserControl it becomes a recursive call and we get an overflow exception, after having chnged the methos to Pieters version that doesent happen anymore, however somehow my Viewdata get corrupted so that even though it looks the same when examining it in debud I cannot access the data i the ViewData. eg. calling the ViewData.ContainsDataItem(MyKey) returns false even though examing the object clearly show the existence of the Key and Data.&lt;/p&gt;&lt;p&gt;Any thoughts? Updates? I am using preview 2 the interim release. Please answer quickly I am so stuck...&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Christian Schiffer</dc:creator><pubDate>Tue, 27 May 2008 07:27:15 -0000</pubDate></item><item><title>Re: Ajax with ASP.NET MVC Framework Preview 2</title><link>http://www.emadibrahim.com/2008/03/31/ajax-with-aspnet-mvc-framework-preview-2/#comment-1601702</link><description>&lt;p&gt;Thanks for the patch. Just noticed something a bit strange. In the AjaxViewExtensions class your change results in a recursive call to the calling View (if that makes sense).&lt;/p&gt;&lt;p&gt;Thus if you try the following (List.aspx):&lt;br&gt;&lt;code&gt;&lt;br&gt;this.RenderPartial("UserList", ViewData.Users);    &lt;br&gt;&lt;/code&gt;&lt;/p&gt;&lt;p&gt;where UserList is a UserControl (ascx), the RenderPartial calls List.aspx again.&lt;/p&gt;&lt;p&gt;To fix this I changed the RenderPartialCore method to:&lt;br&gt;&lt;code&gt;&lt;br&gt;        private static void RenderPartialCore(ViewContext viewContext, string viewName, object viewData)&lt;br&gt;        {&lt;br&gt;            if (String.IsNullOrEmpty(viewName))&lt;br&gt;                throw new ArgumentNullException(viewName);&lt;br&gt;&lt;br&gt;            // TODO: Need to be able to get the view engine associated with this controller&lt;br&gt;            //       without the cast to the specific implementation&lt;br&gt;            Controller controller = (Controller)viewContext.Controller;&lt;br&gt;&lt;br&gt;            // create a new view context for the view called, not the existing view&lt;br&gt;            ViewContext newContext = new ViewContext(controller.ControllerContext, viewName, null, viewData, controller.TempData);&lt;br&gt;&lt;br&gt;            //emad ibrahim: controller has a viewengine already&lt;br&gt;            controller.ViewEngine.RenderView(newContext);&lt;br&gt;            //IViewFactory viewFactory = controller.ViewFactory;&lt;br&gt;            //IView partialView = viewFactory.CreateView(viewContext, viewName, null, viewData);&lt;br&gt;            //partialView.RenderView(viewContext);&lt;br&gt;        }&lt;br&gt;&lt;/code&gt;&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Pieter</dc:creator><pubDate>Tue, 13 May 2008 16:36:12 -0000</pubDate></item><item><title>Re: Ajax with ASP.NET MVC Framework Preview 2</title><link>http://www.emadibrahim.com/2008/03/31/ajax-with-aspnet-mvc-framework-preview-2/#comment-1601701</link><description>&lt;p&gt;Thank you so very much.&lt;/p&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Henry</dc:creator><pubDate>Mon, 07 Apr 2008 09:52:25 -0000</pubDate></item></channel></rss>