本人初学mvc 使用的是最近的ASP.NET MVC 2 Preview 2, 可是新建项目后没有发现Default.aspx页面,运行http://localhost:****/本应该进入/Home/Index页面的,打开的确是一个目录清单---- Wednesday, October 21, 2009 02:15 PM        <dir> App_Data
  Wednesday, October 21, 2009 02:16 PM        <dir> bin
  Wednesday, October 21, 2009 02:15 PM        <dir> Content
  Wednesday, October 21, 2009 02:15 PM        <dir> Controllers
  Wednesday, October 21, 2009 02:15 PM        <dir> Models
  Wednesday, October 21, 2009 02:15 PM        <dir> obj
  Wednesday, October 21, 2009 02:15 PM        <dir> Properties
  Wednesday, October 21, 2009 02:15 PM        <dir> Scripts
  Wednesday, October 21, 2009 02:15 PM        <dir> Views
  Wednesday, October 21, 2009 02:15 PM          101 Global.asax
  Wednesday, October 21, 2009 02:15 PM          968 Global.asax.cs
  Wednesday, October 21, 2009 02:15 PM        7,376 MyMvcTest.csproj
  Wednesday, October 21, 2009 02:15 PM        1,226 MyMvcTest.csproj.user
  Wednesday, October 21, 2009 02:15 PM       12,217 Web.config
代码我一个字都没有改,是不是我哪里没有配置好呀, 谢谢高手解答

解决方案 »

  1.   

    文件--新建--项目--ASP.NET MVC WEB Application!
      

  2.   

    好好看看cnblogs的教程吧http://www.cnblogs.com/zhangziqiu/archive/2009/02/27/ASPNET-MVC-1.html
      

  3.   

    我是这样建的,我的模板是ASP.NET MVC 2 WEB Application
      

  4.   

    找找看有没有ASP.NET MVC WEB ApplicationASP.NET MVC 2 WEB Application是没有Default的要不你就从新装一下
      

  5.   

    Global.asax.cs   #region Default
           routes.MapRoute(
               "Default",                                  
               "{controller}.mvc/{action}/{id}",                            
                new { controller = "Home", action = "Index", id = "" } );
     public partial class _Default : Page
        {
            public void Page_Load(object sender, System.EventArgs e)
            {
                Response.Redirect("~/Home");
            }
        }新建一个default.aspx页面
      

  6.   


    这儿教程我看了,他讲的是mvc1.0   我安装的是 mvc2.0  创建好项目后根本没有default.aspx页面 一般创建好后可以在这个文件上点右键---“在浏览器中查看”, 可mvc2.0没有
      

  7.   


    http://www.microsoft.com/downloads/details.aspx?FamilyID=d3f06bb9-5f5f-4f46-91e9-813b3fce2db1&displaylang=en 
      

  8.   


    谢谢这位高手,问题已解决,原来需要自己手动添加一个default页面