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

  • SEARCH
  • Home
  • 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 8232281
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 7, 20262026-06-07T17:46:53+00:00 2026-06-07T17:46:53+00:00

Ok so I am working with an ASP.NET MVC 3 project. When I first

  • 0

Ok so I am working with an ASP.NET MVC 3 project. When I first started to learn C# ASP.NET, I created a strongly typed view for a controller action. However, I now realized that I don’t need that model (model that my view was strongly typed to) anymore. How can I get rid of the model? I tried excluding it from the project but when I compile my project in VS2010, it says that The page not found. Is there any way to undo the strongly typed part in VS2010 and still be able to keep and display stuff in my view?

Edit:

@using IntraNet.Areas.Roc.Models.ViewModels; @* This is for SiteLookupVM *@
@{ Layout = "~/Views/Shared/_LayoutIntranet.cshtml"; }

<div id="mdPageHdr">FindnSave Metrics</div>
@Html.Partial("_PartialSiteLookup", (SiteLookupVm) ViewBag.SiteLookup)




@if (ViewBag.SiteId > 0)
{   @Html.ActionLink("Bounce Metrics", "BounceMetrics", "Metrics",new { siteId =     @ViewBag.SiteId }, null)
@Html.Partial("_PartialChartDisplay")
}
else
{ 
<div id="tabsWrapper">
<ul id="tabs_menu">
<li>@Html.ActionLink("Page Loads", "Index", null, new { id = "active" })</li>
<li>@Html.ActionLink("Metrics Data", "DashMetrics")</li>
</ul>
</div>

<div id='dashboard'>

    @Html.Partial("_partialMetricsDashboard")
    </div>

 }

Action

protected MetricsDashboardRepository _mdr = new MetricsDashboardRepository();
private LoadHistoryDBEntities db = new LoadHistoryDBEntities();
private AvailabilityContext context = new AvailabilityContext();

public ActionResult Index(int? SiteId)
    {
        SiteLookupVm SiteLookup = new SiteLookupVm();
        SiteLookup.ActionName = "Index";
        SiteLookup.ControllerName = "Metrics";
        ViewBag.SiteLookup = SiteLookup;
        ViewBag.Title = "FNS Metrics";

        if (SiteId != null && SiteId > 0)
        {
            string site = new WPDE().Sites.Where(r => r.SiteId == SiteId).Select(r => r.Name).FirstOrDefault();
            SiteLookup.CurrentSite = site == null ? "Site does not exist" : site;
            ViewBag.SiteId = SiteId;
            ViewBag.FnsId = db.fns_sites.Where(f => f.3id == SiteId && f.enabled).Select(s => s.id).FirstOrDefault();
            ViewBag.RegionData = context.Regions.ToList();
            ViewBag.PathData = context.TestPaths.ToList();
        }
        else
        {
            _mdr.DashSetup();
            ViewBag.mdr = _mdr;
            ViewBag.date = 30;
            ViewBag.order = 0;
            ViewBag.totPageView = _mdr.TotPageView();
            ViewBag.totMonthUni = _mdr.TotMonthUni();
        }
        return View();
    }
  • 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-06-07T17:46:56+00:00Added an answer on June 7, 2026 at 5:46 pm

    In the top of your view, you should see something like this:

    Razor:

    @model YourType
    

    ASPX:

    <%@ Page Language="C#" Inherits="System.Web.Mvc.ViewPage<YourType>" %>
    

    If it’s Razor, remove that line. If it’s ASPX, change <YourType> to <dynamic>

    Regards

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

Sidebar

Related Questions

I working on my first ASP.net MVC project and and i got some problems
I'm working in an ASP.NET MVC project where I have created a two LinqToSQL
I am working with an ASP.NET MVC project which was originally started from the
I'm working on my first real ASP.NET MVC project and I've noticed that the
I am working on a project in ASP.NET MVC using EF4 Code-First for the
background:Me and my coworkers are working on asp.net mvc project ... we have a
I'm working on an ASP.NET MVC project which uses the MarkdownDeep Editor to add
I am currently working on an ASP.NET MVC project. Some developers on the team
I'm working with an ASP.NET MVC 2 project using a classic ASP.NET WebForm wired
I've integrated ASP.NET MVC 3 project into existing Web Forms project. It was working

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.