<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://forums.asp.net/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>ASP.NET MVC</title><link>http://forums.asp.net/1146.aspx</link><description>Discussions regarding Model-View-Controller (MVC) support in ASP.NET.  &lt;a href="http://forums.asp.net/1215.aspx"&gt;T4MVC subforum&lt;/a&gt;</description><dc:language>en</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Re: Passing ViewData To Master and Content Page</title><link>http://forums.asp.net/thread/2103400.aspx</link><pubDate>Fri, 11 Jan 2008 06:22:36 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2103400</guid><dc:creator>rjcox</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2103400.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2103400</wfw:commentRss><description>&lt;p&gt;&amp;nbsp;Known issue, see &lt;a href="http://forums.asp.net/t/1195178.aspx"&gt;http://forums.asp.net/t/1195178.aspx&lt;/a&gt; for a fix.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Passing ViewData To Master and Content Page</title><link>http://forums.asp.net/thread/2102600.aspx</link><pubDate>Thu, 10 Jan 2008 20:25:22 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:2102600</guid><dc:creator>KaziManzurRashid</dc:creator><slash:comments>0</slash:comments><comments>http://forums.asp.net/thread/2102600.aspx</comments><wfw:commentRss>http://forums.asp.net/commentrss.aspx?SectionID=1146&amp;PostID=2102600</wfw:commentRss><description>&lt;p&gt;While playing with the new MVC bit. I found some unusual case. Let’s say I have created a Master Page which takes a strongly typed class as its ViewData and the Content Page takes a subclass of the previously mentioned strongly typed&amp;nbsp;ViewData class. The Folloiwng are the signatures:&lt;br /&gt;&amp;nbsp;&lt;pre class="coloredcode"&gt;&lt;span class="kwd"&gt;public class&lt;/span&gt; BasicViewData
{
}

&lt;span class="kwd"&gt;public class&lt;/span&gt; SubclassViewData : BasicViewData
{
}

&lt;span class="kwd"&gt;public&lt;/span&gt; partial &lt;span class="kwd"&gt;class&lt;/span&gt; SiteMasterPage : ViewMasterPage&amp;lt;BasicViewData&amp;gt;
{
}

&lt;span class="kwd"&gt;public&lt;/span&gt; partial &lt;span class="kwd"&gt;class&lt;/span&gt; SiteContentPage : ViewPage&amp;lt;SubclassViewData&amp;gt;
{
}&lt;/pre&gt;
&lt;p&gt;&amp;nbsp;And I dont think there is anything wrong with the above, usually we want to put the common things in the master pages like Menu, Tag Cloud etc where it will be shown in every pages and in the content page we put page specific items. But when I try to run it no compile time error but when navigating to that content page, it is throwing &amp;quot;A ViewMasterPage&amp;lt;TViewData&amp;gt; can only be used with content pages that derive from ViewPage&amp;lt;TViewData&amp;gt;.&amp;quot; It seems it works in the reverse direction, which i think does not add any value for having a Master Page. Certainly I can use the view data&amp;nbsp;base class in the content page and cust it back to subclass, but having lots of content page it will become pain in the neck.&lt;/p&gt;
&lt;p&gt;&amp;nbsp;Any thoughts on this Issue.&lt;/p&gt;</description></item></channel></rss>