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

The Archive Base Latest Questions

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

Sorry if this as already been asked. I am currently working on a small

  • 0

Sorry if this as already been asked.

I am currently working on a small feature and am trying to implement the ASP.NET Mvc framework into my current Web Forms web application. I have been following the Professional ASP.NET 3.5 Mvc Chapter 13 pdf document that I recently found on stackoverflow to get Web Forms and Mvc to work together. I have completed all three steps:

  1. Added the references to the libraries System.Web.Mvc, System.Web.Routing, and System.Web.Abstractions

  2. Added the two directories to my web application: controllers and views

  3. Updated the web.config to load the three assemblies mentioned in step one and registered the UrlRoutingModule HttpModule. I also added the initial routing settings to my Global.asax file

    RouteTable.Routes.MapRoute( ‘Default’, ‘{controller}/{action}/{id}’, new { controller = ‘Support’, action = ‘Index’, id = ” } );

Once I try and run my newly created page following the ASP.NET Mvc framework I get a NullReferenceException on the following piece of code:

<%= Html.Encode(ViewData['Message']) %> 

In my controller I have ViewData[‘Message’] being set to ‘Message!’ just as a test. Have I missed something setting my web application to work with ASP.NET Mvc?

Any help would be greatly appreciated.

Thanks,

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

    From playing with the early betas, until today, I find it easier to create a new MVC application and ‘import’ my exsiting files into the solution than it is to get all of the settings right in an existing application. I see no reason to get hot and heavy over setting up plumbing I can have written for me from a template. Perhaps I am just too lazy.

    I find that I can get ‘legacy ASP.NET’ web forms working fine with MVC. The only dink to the whole project is getting the app routed to my default.aspx to begin with. Much easier than running through multiple steps to include MVC.

    I know this is not a direct answer to your question, but I think trying it will solve your problem, as well. Another benefit is you leave the old ‘legacy’ source in case a bug fix comes in. But, then, you should be under source control anyway.

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

Sidebar

Ask A Question

Stats

  • Questions 83k
  • Answers 83k
  • Best Answers 0
  • User 1
  • Popular
  • Answers
  • Editorial Team

    How to approach applying for a job at a company ...

    • 7 Answers
  • Editorial Team

    How to handle personal stress caused by utterly incompetent and ...

    • 5 Answers
  • Editorial Team

    What is a programmer’s life like?

    • 5 Answers
  • Editorial Team
    Editorial Team added an answer You'll want to identify the element or container ID and… May 11, 2026 at 4:47 pm
  • Editorial Team
    Editorial Team added an answer Do you have any binding errors messages logged in Output… May 11, 2026 at 4:47 pm
  • Editorial Team
    Editorial Team added an answer This will change some, depending on the connection and execution… May 11, 2026 at 4:47 pm

Related Questions

So I'm trying to build a small 3D engine as an exercise on VC++
I'm sorry if this question has already been answered but I couldn't find it.
As the title suggests, I would like to see if this is something people
Sorry in advance for the long question. What I'm really interested in is a

Trending Tags

analytics british company computer developers django employee employer english facebook french google interview javascript language life php programmer programs salary

Top Members

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.