随笔分类 - MVC3.0
摘要:1:添加控制器类文件HomeController.cs其代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using MvcTestData.Models;namespace MvcTestData.Controllers{ public class HomeController : Controller { // // GET: /Home/ public ActionResu...
阅读全文
摘要:1:首先创建asp.net mvc3应用程序2:创建项目完成后 找到controllers文件鼠标右击选择添加控制器3 为models文件夹添加一个linq to sql类文件,然后把数据库中的数据库复制进来。如截图操作4:添加控制器好后会生成一个HomeController.cs类文件,其代码如下:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using MvcTestData.Models;namespace MvcTestData.
阅读全文

浙公网安备 33010602011771号