<?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>Search results matching tag 'MVC'</title><link>http://forums.asp.net/search/SearchResults.aspx?q=&amp;tag=MVC&amp;orTags=0&amp;o=DateDescending</link><description>Search results matching tag 'MVC'</description><dc:language>en-US</dc:language><generator>CommunityServer 2007 SP1 (Build: 20510.895)</generator><item><title>Using AjaxLibrary with MVC</title><link>http://forums.asp.net/thread/3587325.aspx</link><pubDate>Tue, 29 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3587325</guid><dc:creator>POSDude</dc:creator><description>&lt;p&gt;I thought I would just throw this up for some documentation and to get some positive feedback in case someone else wanted to use the Ajax Library at &lt;a href="http://ajax.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35895#DownloadId=93296"&gt;http://ajax.codeplex.com/Release/ProjectReleases.aspx?ReleaseId=35895#DownloadId=93296&lt;/a&gt; instead of the older AjaxControlToolkit in conjunction with MVC.&lt;/p&gt;&lt;p&gt;I found plenty of different examples of how to use the AjaxControlToolkit with MVC, but no really good examples of how to replace it with the newer AjaxLibrary.&amp;nbsp; So, I went about playing around a bit.&amp;nbsp; I am new at this (MVC/Ajax/Web Sites), so help me make it better if you see some drastic error/problem/issue.&lt;/p&gt;&lt;p&gt;I based all of the helpers from &lt;a href="http://stephenwalther.com/blog/archive/2008/08/23/asp-net-mvc-tip-36-create-a-popup-calendar-helper.aspx"&gt;http://stephenwalther.com/blog/archive/2008/08/23/asp-net-mvc-tip-36-create-a-popup-calendar-helper.aspx&lt;/a&gt; (Thank you for the directions and code Mr. Walther &lt;img src="http://forums.asp.net/tiny_mce/jscripts/tiny_mce/plugins/emotions/img/smiley-smile.gif" alt="Smile" title="Smile" border="0" /&gt;) and from the information on the asp.net examples site: &lt;a href="http://www.asp.net/ajaxlibrary/HOW%20TO%20Use%20the%20Calendar%20Control.ashx"&gt;http://www.asp.net/ajaxlibrary/HOW%20TO%20Use%20the%20Calendar%20Control.ashx&lt;/a&gt; in this case.&amp;nbsp;&amp;nbsp; So far, I am only using the calendar control, and hopefully the resulting code will facilitate allowing me to add other controls as needed.&amp;nbsp; The only part I have some doubt on is the Create function of the AjaxExtensions Helper and whether it will be able to handle other controls and possible parameters.&lt;/p&gt;&lt;p&gt;Here is the code:&lt;/p&gt;&lt;p&gt;&lt;b&gt;ResourceTracker.cs&lt;/b&gt;&lt;i&gt; (no changes from orginal except namespace change)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web;

namespace AjaxLibraryMvc
{
    public class ResourceTracker
    {
        const string resourceKey = &amp;quot;__resources&amp;quot;;
        private List&amp;lt;string&amp;gt; _resources;
        public ResourceTracker(HttpContextBase context)
        {
            _resources = (List&amp;lt;string&amp;gt;)context.Items[resourceKey];
            if (_resources == null)
            {
                _resources = new List&amp;lt;string&amp;gt;();
                context.Items[resourceKey] = _resources;
            }
        }
        public void Add(string url)
        {
            url = url.ToLower();
            _resources.Add(url);
        }
        public bool Contains(string url)
        {
            url = url.ToLower();
            return _resources.Contains(url);
        }
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;ScriptExtensions.cs&lt;/b&gt; &lt;i&gt;(no changes except in namespace)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System.Text;
using System.Web.Mvc;

namespace AjaxLibraryMvc
{
    public static class ScriptExtensions
    {
        public static string ScriptInclude(this AjaxHelper helper, params string[] url)
        {
            var tracker = new ResourceTracker(helper.ViewContext.HttpContext);
            var sb = new StringBuilder();
            foreach (var item in url)
            {
                if (!tracker.Contains(item))
                {
                    tracker.Add(item);
                    sb.AppendFormat(&amp;quot;&amp;lt;script type=&amp;#39;text/javascript&amp;#39; src=&amp;#39;{0}&amp;#39;&amp;gt;&amp;lt;/script&amp;gt;&amp;quot;, item);
                    sb.AppendLine();
                }
            }
            return sb.ToString();
        }
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;AjaxExtensions.cs&lt;/b&gt; &lt;i&gt;(various changes including debug/no debug, path variable changes and functions to use them, and most importantly and the unknown Create)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System;
using System.Text;
using System.Web.Mvc;

namespace AjaxLibraryMvc
{
    public static class AjaxExtensions
    {
        private static string _microsoftAjaxLibraryUrl = &amp;quot;/Scripts/AjaxToolkit/MicrosoftAjax.js&amp;quot;;
        private static string _toolkitFolderUrl = &amp;quot;/Scripts/AjaxToolkit/&amp;quot;;
        private static string _toolkitExtFolderUrl = &amp;quot;/Scripts/AjaxToolkit/extended/&amp;quot;;
        private static string _scriptsFolderUrl = &amp;quot;/Scripts/&amp;quot;;
        #if (DEBUG)
            private static bool _DebugMode = true;
        #else
            private static bool _DebugMode = false;
        #endif

        public static void SetMicrosoftAjaxLibraryUrl(this AjaxHelper helper, string url)
        {
            _microsoftAjaxLibraryUrl = url;
        }

        public static string GetMicrosoftAjaxLibraryUrl(this AjaxHelper helper)
        {
            return _microsoftAjaxLibraryUrl;
        }

        public static void SetToolkitFolderUrl(this AjaxHelper helper, string url)
        {
            _toolkitFolderUrl = url;
        }

        public static string GetToolkitFolderUrl(this AjaxHelper helper)
        {
            return _toolkitFolderUrl;
        }

        public static string MicrosoftAjaxLibraryInclude(this AjaxHelper helper)
        {
            return ScriptExtensions.ScriptInclude(helper, _microsoftAjaxLibraryUrl);
        }

        public static string ToolkitLibraryInclude(this AjaxHelper helper, params string[] fileName)
        {
            var sb = new StringBuilder();
            foreach (string item in fileName)
            {
                var fullUrl = _toolkitFolderUrl + item;
                sb.AppendLine(ScriptExtensions.ScriptInclude(helper, fullUrl));
            }
            return sb.ToString();
        }

        public static string ScriptsLibraryInclude(this AjaxHelper helper, params string[] fileName)
        {
            var sb = new StringBuilder();
            foreach (string item in fileName)
            {
                var fullUrl = _scriptsFolderUrl + item;
                sb.AppendLine(ScriptExtensions.ScriptInclude(helper, fullUrl));
            }
            return sb.ToString();
        }

        public static string ToolkitExtLibraryInclude(this AjaxHelper helper, params string[] fileName)
        {
            var sb = new StringBuilder();
            foreach (string item in fileName)
            {
                var fullUrl = _toolkitExtFolderUrl + item;
                sb.AppendLine( ScriptExtensions.ScriptInclude(helper, fullUrl));
            }
            return sb.ToString();
        }

        public static string DynamicToolkitCssInclude(this AjaxHelper helper, string fileName)
        {
            var fullUrl = _toolkitExtFolderUrl + fileName;
            return helper.DynamicCssInclude(fullUrl);
        }
            
        public static string DynamicCssInclude(this AjaxHelper helper, string url)
        {
            var tracker = new ResourceTracker(helper.ViewContext.HttpContext);
            if (tracker.Contains(url))
                return String.Empty;

            var sb = new StringBuilder();
            sb.AppendLine(&amp;quot;&amp;lt;script type=&amp;#39;text/javascript&amp;#39;&amp;gt;&amp;quot;);
            sb.AppendLine(&amp;quot;var link=document.createElement(&amp;#39;link&amp;#39;)&amp;quot;);
            sb.AppendLine(&amp;quot;link.setAttribute(&amp;#39;type&amp;#39;, &amp;#39;text/css&amp;#39;);&amp;quot;);
            sb.AppendLine(&amp;quot;link.setAttribute(&amp;#39;rel&amp;#39;, &amp;#39;stylesheet&amp;#39;);&amp;quot;);
            sb.AppendFormat(&amp;quot;link.setAttribute(&amp;#39;href&amp;#39;, &amp;#39;{0}&amp;#39;);&amp;quot;, url);
            sb.AppendLine();
            sb.AppendLine(&amp;quot;var head = document.getElementsByTagName(&amp;#39;head&amp;#39;)[0];&amp;quot;);
            sb.AppendLine(&amp;quot;head.appendChild(link);&amp;quot;);
            sb.AppendLine(&amp;quot;&amp;lt;/script&amp;gt;&amp;quot;);
            return sb.ToString();
        }

        public static string Create(this AjaxHelper helper, string clientType, string elementId)
        {
            var sb = new StringBuilder();
            sb.AppendLine(&amp;quot;&amp;lt;script type=&amp;#39;text/javascript&amp;#39;&amp;gt;&amp;quot;);
            if (_DebugMode) sb.AppendLine(&amp;quot;Sys.debug = true;&amp;quot;);
            sb.AppendFormat(&amp;quot;Sys.require(Sys.components.{0}&amp;quot;, clientType);
            sb.Append(&amp;quot;, function(){$(&amp;quot;);
            sb.AppendFormat(&amp;quot;\&amp;quot;#{0}\&amp;quot;).{1}&amp;quot;, elementId, clientType);
            sb.AppendLine(&amp;quot;({})});&amp;quot;);
            sb.AppendLine(&amp;quot;&amp;lt;/script&amp;gt;&amp;quot;);
            return sb.ToString();
        }
    }
}
&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; &lt;b&gt;CalendarExtensions.cs&lt;/b&gt;&lt;i&gt; (various changes: debug/no debug, uses additional path fucntions, ... not much else)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Web.Mvc;

namespace AjaxLibraryMvc
{
    public static class CalendarExtensions
    {
        #if (DEBUG)
            private static bool _DebugMode = true;
        #else
            private static bool _DebugMode = false;
        #endif

        public static string Calendar(this AjaxHelper helper, string elementId)
        {
            var sb = new StringBuilder();

            // Add Microsoft Ajax library
            sb.AppendLine(helper.MicrosoftAjaxLibraryInclude());

            // Add toolkit scripts
            sb.AppendLine(helper.ScriptsLibraryInclude
                (
                    &amp;quot;jquery-1.3.2.js&amp;quot;
                ));
            if (_DebugMode)
            {
                sb.AppendLine(helper.ToolkitLibraryInclude
                    (
                        &amp;quot;Start.debug.js&amp;quot;
                    ));
                sb.AppendLine(helper.ToolkitExtLibraryInclude
                    (
                        &amp;quot;ExtendedControls.debug.js&amp;quot;
                    ));
            }
            else
            {
                sb.AppendLine(helper.ToolkitLibraryInclude
                    (
                        &amp;quot;Start.js&amp;quot;
                    ));
                sb.AppendLine(helper.ToolkitExtLibraryInclude
                    (
                        &amp;quot;ExtendedControls.js&amp;quot;
                    ));
            }

            // Add Calendar CSS file
            sb.AppendLine(helper.DynamicToolkitCssInclude(&amp;quot;Calendar/Calendar.css&amp;quot;));
            // Perform $create
            sb.AppendLine(helper.Create(&amp;quot;calendar&amp;quot;, elementId));

            return sb.ToString();
        }
    }
}&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;b&gt;Edit.aspx&lt;/b&gt; &lt;i&gt;(relevant portions)&lt;/i&gt;&lt;/p&gt;&lt;p&gt;&lt;pre name="code" class="c-sharp"&gt;&amp;lt;%-- At the top of the page --%&amp;gt;
&amp;lt;%@ Import Namespace=&amp;quot;AjaxLibraryMvc&amp;quot; %&amp;gt;
...
&amp;lt;asp:Content ID=&amp;quot;programsEditContent&amp;quot; ContentPlaceHolderID=&amp;quot;MainContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
...
 &amp;lt;label for=&amp;quot;start_date&amp;quot;&amp;gt;Start Date:&amp;lt;/label&amp;gt;
 &amp;lt;%= Html.TextBox(&amp;quot;start_date&amp;quot;, String.Format(&amp;quot;{0:d}&amp;quot;, Model.start_date)) %&amp;gt;
 &amp;lt;%= Ajax.Calendar(&amp;quot;start_date&amp;quot;) %&amp;gt;
 &amp;lt;%= Html.ValidationMessage(&amp;quot;start_date&amp;quot;, &amp;quot;*&amp;quot;) %&amp;gt;
...
&amp;lt;/asp:Content&amp;gt;
&lt;/pre&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt; and thats it.&amp;nbsp; Like I said, the only part I am not sure on will be the Create function of the AjaxExtensions.cs as more controls are needed/used.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Thanks&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Is my jQuery missing?</title><link>http://forums.asp.net/thread/3587775.aspx</link><pubDate>Tue, 29 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3587775</guid><dc:creator>BrianFan</dc:creator><description>&lt;p&gt;I&amp;#39;m doing a new MVC application, and haven&amp;#39;t been able to get&amp;nbsp;anything jQuery working.&amp;nbsp; Here are the files that&amp;nbsp;are in my scripts folder, basically the defaults:&lt;/p&gt;
&lt;p&gt;jquery-1.2.6.min.js&lt;/p&gt;
&lt;p&gt;jquery-1.3.2-vsdoc.js&lt;/p&gt;
&lt;p&gt;jquery-1.3.2.js&lt;/p&gt;
&lt;p&gt;jquery-1.3.2.min-vsdoc.js&lt;/p&gt;
&lt;p&gt;jquery-1.3.2.min.js&lt;/p&gt;
&lt;p&gt;Plus, the MicrosoftAjax.js files are in there too.&lt;/p&gt;
&lt;p&gt;I&amp;#39;m trying to achieve a slide in - slide out functionality,&amp;nbsp;where when&amp;nbsp;I make a selection in &amp;quot;lstCompare&amp;quot; of &amp;quot;List of Niins&amp;quot; or &amp;quot;List of Part Numbers&amp;quot;, the div &amp;quot;pastedText&amp;quot; will slide in, and when the selection in lstCompare is changed to something other than one of those two, the div &amp;quot;pasted Text will slide out and be hidden.&amp;nbsp; Everything needs to be part of the same form.&amp;nbsp; I&amp;#39;m having a lot of difficulty with this.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;Am I missing a jQuery file?&amp;nbsp; My&amp;nbsp;Site.Master only has a reference to jquery-1.2.6.min.js, should it have others as well?????&lt;/p&gt;
&lt;p&gt;Here is my aspx page which I am trying to achieve the slide in and slide out feature:&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;lt;%@ Page Title=&amp;quot;&amp;quot; Language=&amp;quot;C#&amp;quot; MasterPageFile=&amp;quot;~/Views/Shared/Site.Master&amp;quot; Inherits=&amp;quot;System.Web.Mvc.ViewPage&amp;quot; %&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;Content1&amp;quot; ContentPlaceHolderID=&amp;quot;TitleContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
	DataComparison
&amp;lt;/asp:Content&amp;gt;

&amp;lt;asp:Content ID=&amp;quot;Content2&amp;quot; ContentPlaceHolderID=&amp;quot;MainContent&amp;quot; runat=&amp;quot;server&amp;quot;&amp;gt;
&amp;lt;script type=&amp;quot;text/javascript&amp;quot;&amp;gt;

&amp;lt;/script&amp;gt;
    &amp;lt;h2&amp;gt;MRAP-DMS - Data Comparison&amp;lt;/h2&amp;gt;
    &amp;lt;% using (Html.BeginForm())
    {%&amp;gt;
    &amp;lt;table&amp;gt;
    &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;Compare the Following...&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;%= Html.DropDownList(&amp;quot;lstCompare&amp;quot;, (SelectList) ViewData[&amp;quot;CompareOptions&amp;quot;], new { style = &amp;quot;width: 200px;&amp;quot; })%&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;tr&amp;gt;
    &amp;lt;td&amp;gt;Against the Following...&amp;lt;/td&amp;gt;
    &amp;lt;td&amp;gt;&amp;lt;%= Html.DropDownList(&amp;quot;lstAgainst&amp;quot;, (SelectList) ViewData[&amp;quot;AgainstOptions&amp;quot;], new { style = &amp;quot;width: 200px;&amp;quot; })%&amp;gt;&amp;lt;/td&amp;gt;
    &amp;lt;/tr&amp;gt;
    &amp;lt;/table&amp;gt;
    &amp;lt;br /&amp;gt;    
    &amp;lt;div id=&amp;quot;pastedText&amp;quot;&amp;gt;
    &amp;lt;%= Html.TextArea(&amp;quot;txtNiins&amp;quot;, new { style = &amp;quot;width: 400px;&amp;quot; }) %&amp;gt;
    &amp;lt;/div&amp;gt;
   
    &amp;lt;%} %&amp;gt;
&amp;lt;/asp:Content&amp;gt;&lt;/pre&gt;
&lt;p&gt;&lt;br /&gt;&amp;nbsp;&lt;/p&gt;</description></item><item><title>Re: ListBox selected index changed</title><link>http://forums.asp.net/thread/3588084.aspx</link><pubDate>Tue, 29 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3588084</guid><dc:creator>Rybo</dc:creator><description>&lt;p&gt;Hello, &amp;nbsp;I&amp;#39;m doing something similar on my site.&lt;/p&gt;&lt;p&gt;What you can do is give the list box an id in your HTML attributes object list -&amp;gt; new { ..., &amp;nbsp;@id = &amp;quot;myId&amp;quot; }.&lt;/p&gt;&lt;p&gt;In your &amp;quot;script&amp;quot; section, you can call &amp;quot;#myId&amp;quot; fadeIn(400) function from jQuery in a js function.&lt;/p&gt;&lt;p&gt;On $(document).ready(function() { &amp;nbsp;$(&amp;quot;#myId&amp;quot;).fadeOut(0);})}); -&amp;gt; This will fade it out when the page loads.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Hope this helps.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;/p&gt;</description></item><item><title>Nested View Folders</title><link>http://forums.asp.net/thread/3588097.aspx</link><pubDate>Tue, 29 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3588097</guid><dc:creator>mousedoc</dc:creator><description>&lt;p&gt;I have unsuccessfully been trying to get MVC to use nested view folders like ~/Views/Group1/myview.aspx.&amp;nbsp;&amp;nbsp;I&amp;#39;ve tried adding a map route {folder}/{controller}/{action}/{id} and folder/{controller}/{action}/{id}, both of which find the controller ok but not the view. I then tried creating my own view&amp;nbsp;engine descending from WebFormViewEngine to add folder mapping and receive an error when attempting to call folder/action. Any suggestions?&lt;/p&gt;
&lt;p&gt;Here&amp;#39;s my properly registered view engine.&lt;/p&gt;&lt;pre class="c-sharp" name="code"&gt;        public PortalViewEngine()
        {
            /* {0} = view name or master page name
             * {1} = controller name
             * {2} = module name
             */

            var locations = new List&amp;lt;string&amp;gt;
                {
                    &amp;quot;~/Views/Shared/{2}/{1}/{0}.aspx&amp;quot;,
                    &amp;quot;~/Views/Shared/{2}/{1}/{0}.ascx&amp;quot;
                };

            base.MasterLocationFormats = base.MasterLocationFormats.Union(locations).ToArray&amp;lt;string&amp;gt;();

            locations.Add(&amp;quot;~/Views/{2}/{1}/{0}.aspx&amp;quot;);
            locations.Add(&amp;quot;~/Views/{2}/{1}/{0}.ascx&amp;quot;);

            base.ViewLocationFormats = base.ViewLocationFormats.Union(locations).ToArray&amp;lt;string&amp;gt;();

            base.PartialViewLocationFormats = base.ViewLocationFormats;
        }

        protected override IView CreatePartialView(ControllerContext controllerContext, string partialPath)
        {
            return new WebFormView(partialPath, null);
        }

        protected override IView CreateView(ControllerContext controllerContext, string viewPath, string masterPath)
        {
            return new WebFormView(viewPath, masterPath);
        }
    }&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;and here&amp;#39;s the error&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;&amp;nbsp;&lt;/pre&gt;&lt;pre class="c-sharp" name="code"&gt;&lt;span&gt;&amp;nbsp;
&lt;h1&gt;Server Error in &amp;#39;/&amp;#39; Application. 
&lt;hr /&gt;
&lt;/h1&gt;
&lt;h2&gt;&lt;i&gt;Index (zero based) must be greater than or equal to zero and less than the size of the argument list.&lt;/i&gt; &lt;/h2&gt;
&lt;/span&gt;&lt;font face="Arial, Helvetica, Geneva, SunSans-Regular, sans-serif "&gt;&lt;b&gt;Description: &lt;/b&gt;An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code. &lt;br /&gt;&lt;br /&gt;&lt;b&gt;Exception Details: &lt;/b&gt;System.FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.&lt;br /&gt;&lt;br /&gt;&lt;b&gt;Source Error:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;
&lt;table bgcolor="#ffffcc"&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;An unhandled exception was generated during the execution of the current web request. Information regarding the origin and location of the exception can be identified using the exception stack trace below.&lt;/code&gt; &lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;&lt;b&gt;Stack Trace:&lt;/b&gt; &lt;br /&gt;&lt;br /&gt;
&lt;table bgcolor="#ffffcc"&gt;&lt;tr&gt;&lt;td&gt;&lt;code&gt;
&lt;pre&gt;[FormatException: Index (zero based) must be greater than or equal to zero and less than the size of the argument list.]
   System.Text.StringBuilder.AppendFormat(IFormatProvider provider, String format, Object[] args) +9440256
   System.String.Format(IFormatProvider provider, String format, Object[] args) +107
   System.Web.Mvc.ViewLocation.Format(String viewName, String controllerName, String areaName) +114
   System.Web.Mvc.VirtualPathProviderViewEngine.GetPathFromGeneralName(ControllerContext controllerContext, List`1 locations, String name, String controllerName, String areaName, String cacheKey, String[]&amp;amp; searchedLocations) +166
   System.Web.Mvc.VirtualPathProviderViewEngine.GetPath(ControllerContext controllerContext, String[] locations, String[] areaLocations, String locationsPropertyName, String name, String controllerName, String cacheKeyPrefix, Boolean useCache, String[]&amp;amp; searchedLocations) +688
   System.Web.Mvc.VirtualPathProviderViewEngine.FindView(ControllerContext controllerContext, String viewName, String masterName, Boolean useCache) +291
   System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass6.&amp;lt;FindView&amp;gt;b__5(IViewEngine e) +60
   System.Web.Mvc.ViewEngineCollection.Find(Func`2 cacheLocator, Func`2 locator) +369
   System.Web.Mvc.ViewEngineCollection.FindView(ControllerContext controllerContext, String viewName, String masterName) +329
   System.Web.Mvc.ViewResult.FindView(ControllerContext context) +135
   System.Web.Mvc.ViewResultBase.ExecuteResult(ControllerContext context) +202
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResult(ControllerContext controllerContext, ActionResult actionResult) +39
   System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass11.&amp;lt;InvokeActionResultWithFilters&amp;gt;b__e() +60
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultFilter(IResultFilter filter, ResultExecutingContext preContext, Func`1 continuation) +391
   System.Web.Mvc.&amp;lt;&amp;gt;c__DisplayClass13.&amp;lt;InvokeActionResultWithFilters&amp;gt;b__10() +61
   System.Web.Mvc.ControllerActionInvoker.InvokeActionResultWithFilters(ControllerContext controllerContext, IList`1 filters, ActionResult actionResult) +285
   System.Web.Mvc.ControllerActionInvoker.InvokeAction(ControllerContext controllerContext, String actionName) +870
   System.Web.Mvc.Controller.ExecuteCore() +180
   System.Web.Mvc.ControllerBase.Execute(RequestContext requestContext) +111
   System.Web.Mvc.ControllerBase.System.Web.Mvc.IController.Execute(RequestContext requestContext) +39
   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContextBase httpContext) +392
   System.Web.Mvc.MvcHandler.ProcessRequest(HttpContext httpContext) +74
   System.Web.Mvc.MvcHandler.System.Web.IHttpHandler.ProcessRequest(HttpContext httpContext) +39
   System.Web.CallHandlerExecutionStep.System.Web.HttpApplication.IExecutionStep.Execute() +100
   System.Web.HttpApplication.ExecuteStep(IExecutionStep step, Boolean&amp;amp; completedSynchronously) +75
&lt;/pre&gt;
&lt;/code&gt;&lt;/td&gt;&lt;/tr&gt;&lt;/table&gt;
&lt;br /&gt;
&lt;hr /&gt;
&lt;b&gt;Version Information:&lt;/b&gt;&amp;nbsp;Microsoft .NET Framework Version:4.0.21006; ASP.NET Version:4.0.21006.1 &lt;/font&gt;&lt;/pre&gt;</description></item><item><title>What is the best approach for handling MasterPages?</title><link>http://forums.asp.net/thread/3586088.aspx</link><pubDate>Mon, 28 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3586088</guid><dc:creator>jjtoubia</dc:creator><description>&lt;p&gt;I was wondering what your opinions are in regards to&amp;nbsp;handling MasterPages. I have integrated MVC into an existing Web Forms project which uses our in house CMS system. In the existing webforms system all logic for meta information, menus, page options etc. are in the base class for the Page and MasterPage. As of right now, my controller inherits from a MasterPageController which inherits from a SiteFrameMasterPageController and the MasterPageController overrides OnActionExecuted and sets the MasterName and stuffs MasterPage specific content into ViewData. Thats well and all and it works fine&amp;nbsp;but something tells me it can be handled better. I have realized in the&amp;nbsp;three books and the numerous blog postings I have read in regards to MVC, I haven&amp;#39;t really seen anyone talk about MasterPage approaches where you have more involved masterpages other than the one that ships with the project template in Visual Studio.&lt;/p&gt;
&lt;p&gt;Should I stick with controllers inheriting from a MasterPage controller and let them fill in the ViewData information? Should I use an ActionFilterAttributes and decorate methods with an attribute that describes which&amp;nbsp;MasterPage to use and fill in the ViewData that way? Or maybe use a custom ViewEngine that loads and fills a Model based on the requested masterName? If you have an opinion on the matter, I would love to hear it. If you know of a good resource to learn more about using the best approach for complex MasterPages...blog, book, webcast, I would appreciate that as well. Thanks!&lt;/p&gt;</description></item><item><title>Re: ASP.NET Developer needed in Baton Rouge, LA</title><link>http://forums.asp.net/thread/3583839.aspx</link><pubDate>Sat, 26 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3583839</guid><dc:creator>mohammadtanveer</dc:creator><description>&lt;p&gt;Hello,&lt;br /&gt;&lt;br /&gt;I am Tanveer, I have 6+ years of web development experience and have worked on more than 20 websites/web applications like Portals, Ecommerce, Auctions, Multilevel Marketing, Ads Management, Real Estate, Online Jobs, Online Music, Web to SMS, Online News, Online Calssifieds, Shopping Carts.&lt;br /&gt;I have done most of the&amp;nbsp; websites/web applications completely and some in the form of a team using different technologies like Asp.Net,PHP,Wordpress,Joomla,MVC,Ajax,Silverlight,C#.Net,VB.NET,JQuery,Javascript,HTML,CSS,MSSQL Server,MySQL.&lt;br /&gt;&lt;br /&gt;Some examples of my work are as follows:&lt;br /&gt;&lt;br /&gt;http://thebirthdirectory.com/&lt;br /&gt;http://www.crebn.com/&lt;br /&gt;http://linksexchangedirectory.org/&lt;br /&gt;http://www.capitalcaterers.co.uk/&lt;br /&gt;http://project19.tempowebdesign.co.uk/&lt;br /&gt;http://www.mortanian.com/v2/&lt;br /&gt;http://www.renaissancehomebuilder.com&lt;br /&gt;http://www.coldwatersda.com&lt;br /&gt;http://www.hambelly.com&lt;br /&gt;http://www.nulled2.com/auction&lt;br /&gt;http://www.iraq2us.com&lt;br /&gt;http://www.abtxt.com&lt;br /&gt;http://www.abetterdriver.com&lt;br /&gt;http://www.biotechbuildings.com&lt;br /&gt;http://www.desisong.com&lt;br /&gt;http://www.workforce.com.pk&lt;br /&gt;http://www.pakistanway.com&lt;br /&gt;http://www.phoneride.com&lt;br /&gt;http://www.instawireless.com&lt;br /&gt;http://www.illinoisdivorce.com&lt;br /&gt;&lt;br /&gt;My Contact ids:&lt;br /&gt;&lt;br /&gt;msn: tanveer_411393@hotmail.com&lt;br /&gt;skype: mohammadtanveer&lt;br /&gt;gtalk: mtanveer@gmail.com&lt;br /&gt;yahoo: mtanveer123@yahoo.com&lt;/p&gt;&lt;p&gt;&lt;/p&gt;&lt;div id="refHTML"&gt;&lt;/div&gt;</description></item><item><title>Re: MissingMethodException: Method not found: 'System.Web.Mvc.HtmlHelper System.Web.Mvc.ViewPage.get_Html()'.</title><link>http://forums.asp.net/thread/3582272.aspx</link><pubDate>Thu, 24 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3582272</guid><dc:creator>HerryAtHotmail</dc:creator><description>&lt;p&gt;hi.&lt;/p&gt;&lt;p&gt;this may be&amp;nbsp; because of&amp;nbsp;&lt;b&gt; method not included&lt;/b&gt; in you Installation. please &lt;b&gt;upgrade &lt;/b&gt;with latest release of MVC.&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;thanks.&lt;br /&gt;&lt;/p&gt;</description></item><item><title>Foolproof way of telling if installed?</title><link>http://forums.asp.net/thread/3579544.aspx</link><pubDate>Tue, 22 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3579544</guid><dc:creator>marcoshaw</dc:creator><description>&lt;p&gt;VS 2008 Pro with SP1&lt;/p&gt;&lt;p&gt;Is there a foolproof way to tell is MVC is loaded?&amp;nbsp; Are there any templates added?&amp;nbsp; If not, I&amp;#39;ll try to find some intro or beginner sample.&amp;nbsp; Currently, I&amp;#39;ve only tried to load a project that uses MVC, but it fails (&lt;a href="http://forums.asp.net/t/1506782.aspx"&gt;http://forums.asp.net/t/1506782.aspx&lt;/a&gt;).&lt;/p&gt;</description></item><item><title>Christmas Presents!</title><link>http://forums.asp.net/thread/3577004.aspx</link><pubDate>Mon, 21 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3577004</guid><dc:creator>Php_Asp_Expert</dc:creator><description>&lt;p&gt;It is almost Christmas time and it is difficult to think anything beyond turkey and presents!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Would you like to receive one more Christmas present? &lt;/p&gt;&lt;p&gt;Register now at &lt;a href="http://www.phpaspjobs.co.uk"&gt;www.phpaspjobs.co.uk&lt;/a&gt; and upload your CV for a chance to win a brilliant ASP.NET book, the PRO ASP.NET MVC FRAMEWORK by Apress.Here are the details: &lt;a href="http://www.phpaspjobs.co.uk/promo.aspx"&gt;http://www.phpaspjobs.co.uk/promo.aspx&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Or if you need to do a bit of last minute shopping for Christmas presents you can find plenty of exciting techy gift ideas here:&lt;/p&gt;&lt;p&gt;&lt;a href="http://www.phpaspjobs.co.uk/blog"&gt;http://www.phpaspjobs.co.uk/blog&lt;/a&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;Have a wonderful Christmas full of presents!&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;&lt;p&gt;&lt;br /&gt;&lt;/p&gt;</description></item><item><title>The controller for path '/' could not be found or it does not implement IController.</title><link>http://forums.asp.net/thread/3577606.aspx</link><pubDate>Mon, 21 Dec 2009 05:00:00 GMT</pubDate><guid isPermaLink="false">4c671506-2930-414c-a40b-8bf57ded5924:3577606</guid><dc:creator>whizzconsult</dc:creator><description>&lt;p&gt;Hi,&amp;nbsp; I am trying to complete the MVC Contact Manger program using MS SQL as opposed to express.&amp;nbsp; I am making some progress however, I keep getting the error above.&amp;nbsp; &lt;/p&gt;
&lt;p&gt;I have modified my global asax code to&amp;nbsp;&amp;quot;HomeCrontroller&amp;quot; but still can&amp;#39;t get around this error:&lt;/p&gt;
&lt;p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font size="2"&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;
&lt;p&gt;public &lt;/font&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; RegisterRoutes(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;RouteCollection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; routes)&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;font size="2"&gt;
&lt;p&gt;routes.IgnoreRoute(&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;{resource}.axd/{*pathInfo}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/p&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;routes.MapRoute(&lt;/p&gt;
&lt;p&gt;&lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;public&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;static&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;void&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; RegisterRoutes(&lt;/font&gt;&lt;font color="#2b91af" size="2"&gt;&lt;font color="#2b91af" size="2"&gt;RouteCollection&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; routes)&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;{resource}.axd/{*pathInfo}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;);&lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Default&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;// Route name&lt;/font&gt;&lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;
&lt;p&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;{controller}/{action}/{id}&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;// URL with parameters&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/font&gt;&lt;/p&gt;&lt;/p&gt;
&lt;p&gt;&lt;font color="#0000ff" size="2"&gt;&lt;font color="#0000ff" size="2"&gt;new&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; { controller = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;HomeController&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, action = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;Index&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt;, id = &lt;/font&gt;&lt;font color="#a31515" size="2"&gt;&lt;font color="#a31515" size="2"&gt;&amp;quot;&amp;quot;&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; } &lt;/font&gt;&lt;font color="#ff0000" size="2"&gt;&lt;font color="#ff0000" size="2"&gt;// Parameter defaults&lt;/font&gt;&lt;/font&gt;&lt;font size="2"&gt; &lt;/p&gt;
&lt;p&gt;);&lt;/p&gt;
&lt;p&gt;Any help is appreicated.&lt;/p&gt;&lt;/font&gt;</description></item></channel></rss>