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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 25, 20262026-05-25T23:34:40+00:00 2026-05-25T23:34:40+00:00

I am following this tutorial to create the first mvc application ( Create a

  • 0

I am following this tutorial to create the first mvc application (Create a Movie Database Application).

I already added the create view, but when I click on the Create new link, the page does not exist. Typical 404 error.

I tried

/home/create
/create
/create.aspx
/home/create.aspx

I am very newbie at MVC, so please dont laugh. 🙂

EDIT: GLobal .asax

public static void RegisterRoutes(RouteCollection routes)
        {
            routes.IgnoreRoute("{resource}.axd/{*pathInfo}");

            routes.MapRoute(
                "Default", // Route name
                "{controller}/{action}/{id}", // URL with parameters
                new { controller = "Home", action = "Index", id = UrlParameter.Optional } // Parameter defaults
            );

        }

HomeController

using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.Mvc;
using Movies.Models;

namespace Movies.Controllers
{
    public class HomeController : Controller
    {
        //
        // GET: /Home/

        private LearningEntities _db = new LearningEntities();

        public ActionResult Index()
        {

            return View(_db.Movies1.ToList());

        }

        [AcceptVerbs(HttpVerbs.Post)]
        public ActionResult Create([Bind(Exclude = "Id")] Movie movieToCreate)
        {

            if (!ModelState.IsValid)
                return View();
            _db.AddToMovies1(movieToCreate);
            _db.SaveChanges();
            return RedirectToAction("Index");

        } 

    }
}
  • 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-25T23:34:40+00:00Added an answer on May 25, 2026 at 11:34 pm

    You need a Get as well as Post Create method in your controller. You need the following

    public ActionResult Create() 
    {
        return View();
    }
    
    public ActionResult Create([Bind(Exclude = "Id")] Movie movieToCreate) 
    { 
     ....
    }
    

    Edit: The URL to your create view is /Home/Create

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

Sidebar

Related Questions

I've been experimenting with ASP.NET MVC and following this tutorial to create the basic
I'm following the Create your First Tiny MVC Boilerplate with PHP tutorial, and as
I have followed this tutorial to create the first azure application http://msdn.microsoft.com/en-us/WAZPlatformTrainingCourse_IntroToWindowsAzureLabVS2010 Because after
Hi i am following this tutorial http://www.vogella.de/articles/AndroidGestures/article.html i want to create an application in
I'm new to NHibernate... I have been following this NHibernate Tutorial from Gabriel Schenker
I've been following this tutorial on how to implement a Silverlight application. The tutorial
I'm learning ASP.NET MVC 3 with Entity Framework Code First. I'm following a tutorial
I've been following this tutorial to create my own custom project type and for
I was following this tutorial of Sencha Touch: http://www.vimeo.com/15672696 Perfect tutorial, worked flawless. But
I've been following this tutorial (lesson 6) in order to build and deploy a

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.