Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • Home
  • SEARCH
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 673719
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 14, 20262026-05-14T00:37:37+00:00 2026-05-14T00:37:37+00:00

I am attempting to create a strongly typed view with a MVC View User

  • 0

I am attempting to create a strongly typed view with a “MVC View User Control” that is being rendered using Html.RenderPartial(). The top of my ascx file looks like this:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>" %>

There is nothing else on this page, currently.

When I execute the app and load the page that renders this control, I get the following error:

 Could not load type 'System.Web.Mvc.ViewUserControl<System.Collections.IEnumerable<string>>'.

So, then I simplified it:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<String>" %>

And then, just in case it needed to be fully qualified:

<%@ Control Language="C#" Inherits="System.Web.Mvc.ViewUserControl<System.String>" %>

Everytime I get the same error (substituting type). what am I doing wrong here? I’m on .NET 3.5 with ASP.NET MVC 1.0 RTM.

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-14T00:37:37+00:00Added an answer on May 14, 2026 at 12:37 am

    I got it working. I followed the instructions from http://www.codewrecks.com/blog/index.php/2009/04/05/could-not-load-type-systemwebmvcviewpage/ and that did the trick for me. I should note that I also upgraded to the ASP.NET MVC 2.0 RC as of 3/17/2010 first. The problem persisted for me still until I followed the instructions on that page. I’m not sure if a fresh MVC project does this for you now or not.

    The solution, in case the referenced page goes away, was to add a Web.config to my Views directory, and put this in it:

    <?xml version="1.0"?>
    <configuration>
      <system.web>
      <httpHandlers>
        <add path="*" verb="*"
          type="System.Web.HttpNotFoundHandler"/>
      </httpHandlers>
    
    <!--
        Enabling request validation in view pages would cause validation to occur
        after the input has already been processed by the controller. By default
        MVC performs request validation before a controller processes the input.
        To change this behavior apply the ValidateInputAttribute to a
        controller or action.
    -->
    <pages
        validateRequest="false"
        pageParserFilterType="System.Web.Mvc.ViewTypeParserFilter, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        pageBaseType="System.Web.Mvc.ViewPage, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"
        userControlBaseType="System.Web.Mvc.ViewUserControl, System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35">
      <controls>
        <add assembly="System.Web.Mvc, Version=2.0.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35" namespace="System.Web.Mvc" tagPrefix="mvc" />
      </controls>
    </pages>
    </system.web>
    
    <system.webServer>
    <validation validateIntegratedModeConfiguration="false"/>
    <handlers>
      <remove name="BlockViewHandler"/>
        <add name="BlockViewHandler" path="*" verb="*" preCondition="integratedMode" type="System.Web.HttpNotFoundHandler"/>
    </handlers>
    </system.webServer>
    </configuration>
    

    I should also note that for MVC 2.0 you need to update the version #’s in the config.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm attempting to create a custom calendar control that inherits from ASP.Net's built in
I'm attempting to authenticate a user against ADAM using a user I created in
I'm currently attempting to create a tabbed interface in a web application, and based
I am attempting to create a small application to collect data received from an
I am attempting to create new membership users in an Ektron CMS400.NET-based website by
I'm attempting to create my first real C# application - a small pet project
I'm attempting to load a dll into MSSQL with: USE dbname GO CREATE ASSEMBLY
I am attempting to build a simple method that creates an XML file from
In attempting to create an initial, failing unit test in Visual Studio Professonal 2008's
When attempting to create a tag of a working copy we receive the error,

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.