【摘要】 一、获取数据库中某一条记录字段的值
1、数据库中的新建一个表CSJ2、分别创建五个文件
(1)、Controllers中添加【CsjController.cs】和View中【Index.cshtml】CsjController.cs页面代码
using System;using System.Collections.Generic;using CityC…
一、获取数据库中某一条记录字段的值
1、数据库中的新建一个表CSJ
2、分别创建五个文件
(1)、Controllers中添加【CsjController.cs】和View中【Index.cshtml】
CsjController.cs页面代码
using System;
using System.Collections.Generic;
using CityCard.Web.Admin.Model;
using System.Linq;
using System.Text;
using System.Web.Mvc;
using System.Web;
using System.Drawing;
using System.Net; //LoginType 需要
namespace CityCard.Web.Admin.Controllers
{
public class CsjController : Controller
{
public ActionResult Index()
{
var Bll_User = new CityCard.Web.Admin.BLL.Csj();
ViewData["User"] = Bll_User.Get_FieldValue("关羽") ; // 获取姓名等于关羽的记录
return View();
}
}
}
© 版权声明文章版权归作者所有,未经允许请勿转载。THE END
喜欢就支持一下吧
相关推荐