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 6920195
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T10:07:00+00:00 2026-05-27T10:07:00+00:00

I have a strongly-typed view with a @model declaration: @model MyViewModel When using extension

  • 0

I have a strongly-typed view with a @model declaration:

@model MyViewModel

When using extension methods like this in my Razor views:

@Html.TextBoxFor(m => m.Foo)

Visual Studio shows errors like this:

The type arguments for method ‘System.Web.Mvc.Html.InputExtensions.TextBoxFor<TModel,TProperty>(System.Web.Mvc.HtmlHelper<TModel>, System.Linq.Expressions.Expression<System.Func<TModel,TProperty>>)’ cannot be inferred from the usage. Try specifying the type arguments explicitly.

These are only errors shown for the editor window; the view renders just fine at runtime.

Does this happen for everyone, or is there something I can do to make the Razor editor work better?

  • 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-27T10:07:01+00:00Added an answer on May 27, 2026 at 10:07 am

    Thanks to this answer, I found the solution. In my web.config, once I specified a targetFramework attribute in my system.web/compilation config section, all of those nasty warnings disappeared. Previously, no targetFramework was specified. Strangely, Visual Studio doesn’t just use the target framework of your project:

    <compilation debug="true" targetFramework="4.0">
      <!-- ... -->
    </compilation>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a strongly typed View that accepts a Customer model, this customer model
I have a strongly typed view, Edit, with a model named OrderModel. In this
I have a strongly typed razor view for a model in my MVC 3
i have a strongly typed asp.net-mvc view and the Model has a . Links
I have a view model like this: public class EditVM { public Media.Domain.Entities.Movie Movie
I have a strongly typed partial view CheckBox.ascx that renders a checkbox. This is
I have a strongly-typed view that receives a Design model for its rendering. My
I have a PartialView strongly typed to a view model <%@ Control Language=C# Inherits=System.Web.Mvc.ViewUserControl<VATRateManager_MVC.Models.ViewModels.RateControlEditViewModel>
I have a strongly typed view. I get model passed into the view and
I have a strongly typed viewpage that I created that looks like this: <%@

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.