Introduction to MVC 3

This sample will teach you the basics of building an ASP.NET MVC Web application using Microsoft Visual Web Developer 2010 Express. It is part of a tutorial series written by ScottGu, Scott Hanselman and Rick Anderson.

 
 
 
 
 
(43)
76,048 times
Add to favorites
5/25/2012
E-mail Twitter del.icio.us Digg Facebook
Sign in to ask a question


  • VB.NET download
    1 Posts | Last post March 14, 2012
    • I have tried to open the VB.NET download on 2 different computers using Visual Studio 2010 Professional and get the same 9 errors. The C# download works fine on both systems but I need to work with VB.NET. Please let me know if there is a fix or updated download.
      
      Thanks!
  • I can't get the VB.NET version to build. The C# version works just fine. Is there an updated VB.NET version?
    1 Posts | Last post March 14, 2012
    • I can't get the VB.NET version to build. The C# version works just fine. Is there an updated VB.NET version?
  • When will the MVC 4 be born?
    3 Posts | Last post December 09, 2011
    • I am afraid of the MVC 4. I am a developer. I don't dare to use MVC 3 in my project. Can you tell me is it in its autumn?
    • I wouldn't let the next version stop me from using ASP.NET MVC 3 now. You won't loose your investment by starting now.
    • You can judge it by yourself: http://www.asp.net/mvc/mvc4
  • Literal
    2 Posts | Last post December 09, 2011
    • I am a newbie in this ASP.NET MVC.
      What is the meaning of "M" in "Price=7.99M"?
      Could you give me link to the syntax/data types?
      Thx in advance.
    • Hi,
      
      If you want a numeric real literal to be treated as decimal, use the suffix m or M, for example:
      
      decimal myMoney = 300.5m;
       
      Without the suffix m, the number is treated as a double and generates a compiler error.
  • Can't find Movies.sdf Database after MVC 3 Install for VS2010 Pro
    2 Posts | Last post December 01, 2011
    • Can't find Movies.sdf Database. Used downloadded AspNetMVC3Setup.exe with mvc3-rtm-mspl.zip files to install pkg instead of WEB Installer method, and get the missing Movies data file error also. I've done a full search on my C:\ drive & got no file(s) found msg.
      
      Checked web.config file but without Movies.sdf file installed can'y chane connetionString Directory variable to Attach Movies.sdf file.
      
      Appreciate any assistance.  Have C# source files &MVC 3 framework avail in my VS2010 Pro proj templates, but upon successful compile & debug/run of project get System.ArgumentException '{"Unable to find the requested .Net Framework Data Provider.  It may not be installed."}' in MoviesController.cs Method: public ViewResult Index() line #107: return View(db.Movies.ToList());
      
      Thanks
    • Movies.sdf is not included in the download, it is created on the fly. 
      >> System.ArgumentException '{"Unable to find the requested .Net Framework Data Provider. It may not be installed."}
      You don't have SQL Compact installed. Use the Web Installer. 
      Follow the instructions "Finally, if you wish to know what providers that are available for your application" at http://blogs.msdn.com/b/spike/archive/2008/12/19/unable-to-find-the-requested-net-framework-data-provider-it-may-not-be-installed.aspx
  • Is something wrong with my PC?
    1 Posts | Last post October 07, 2011
    • Getting this error on this part: http://www.asp.net/mvc/tutorials/getting-started-with-mvc3-part5-cs
      
      Can't seem to connect to the db for some reason and I installed everything.  Here's what I tried in my web.config:
      
      
      A.)
          
        <connectionStrings>
          <add name="MovieDBContext" 
               connectionString="Data Source=|DataDirectory|Movies.sdf" 
               providerName="System.Data.SqlServerCe.4.0"/>
            <add name="MovieDBContext"
                 connectionString="data source=localhost\SQLEXPRESS;Integrated Security=SSPI;database=Movies;User ID=sa;password="
                 providerName="System.Data.SqlClient"/>
        </connectionStrings>
      
      
      
      B.)
        <connectionStrings>
          <add name="MovieDBContext" 
               connectionString="Data Source=|DataDirectory|Movies.sdf" 
               providerName="System.Data.SqlServerCe.4.0"/>
            <add name="MovieDBContext"
                 connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;database=Movies;User ID=sa;password="
                 providerName="System.Data.SqlClient"/>
        </connectionStrings>
      
      
      
      C.)
        <connectionStrings>
          <add name="MovieDBContext" 
               connectionString="Data Source=|DataDirectory|Movies.sdf" 
               providerName="System.Data.SqlServerCe.4.0"/>
          <add name="ApplicationServices"
               connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|aspnetdb.mdf;User Instance=true"
               providerName="System.Data.SqlClient" />
        </connectionStrings>
      
      
      
      
      here's the consistent error:
      
      
      Server Error in '/' Application.
      
      A network-related or instance-specific error occurred while establishing a connection to SQL Server. The server was not found or was not accessible. Verify that the instance name is correct and that SQL Server is configured to allow remote connections. (provider: SQL Network Interfaces, error: 26 - Error Locating Server/Instance Specified)
      
      
      
  • Decimal input validation problem
    1 Posts | Last post September 08, 2011
    • I tried to input a decimal number on price-field (e.g 9.99). As soon as I click "Create" button, it shows validation error: The value "9.99" is for "price" invalid.
      I tried also to input "9,99" (since my PC uses regional setting German). It is also failed. I can only input price as integer e.g. 9 or 10.
      In case of "ReleaseDate" it doesn't accept [M/D/Y]-format "1/6/1990" but [D.M.Y]-format "06.01.1990".
      Thx in advance.
  • Theres a bug in the jquery.validate.unobtrusive.js, where do i submit a fix?
    2 Posts | Last post September 01, 2011
    • I have found a bug in the equalTo adapter in the jquery.validate.unobtrusive.js file, and want to submit a patch.
      
      the line is the following:
       element = $(options.form).find(":input[name=" + fullOtherName + "]")[0];
      
      it should be 
       element = $(options.form).find(":input[name='" + fullOtherName + "']")[0];
      
      as it is further down in the remote adapter in the file, otherwise using Form.NewPassword and Form.OldPassword to compare values would not work correctly in the latest versions of jQuery.
      
      Thanks,
      Karel
    • Thanks for the report. Submit the bug at http://docs.jquery.com/Frequently_Asked_Questions#How_do_I_submit_a_bug_report.3F
      
  • Test Please Ignore
    1 Posts | Last post March 24, 2011
    • Testing Comments with the new Q & A section.
11 - 19 of 19 Items