public ActionResult DownLoad() { var download = new Download(); using (DataClasses1DataContext db = new DataClasses1DataContext()) { download = db.Dow ...
分类:
Web程序 时间:
2017-11-21 14:44:05
阅读次数:
176
public ActionResult xiazai(int id) { DataTable dt = bll.chaxun(id); //获取文件名字 var filename = dt.Rows[0]["SCName"]; //完整路径 var newname = Server.MapPath( ...
分类:
Web程序 时间:
2017-11-13 21:23:41
阅读次数:
226
/// <summary> /// 添加 /// </summary> /// <returns></returns> public ActionResult add() { return View(); } [HttpPost] public ActionResult add(infoMODEL ...
分类:
Web程序 时间:
2017-11-13 21:17:14
阅读次数:
150
直接进入正题。 在HomeController中有一个NotFound的Action方法。 public ActionResult NotFound() { return View(); } 对应的视图 @{ Layout = null; } <!DOCTYPE html> <html> <head ...
分类:
Web程序 时间:
2017-11-10 01:34:12
阅读次数:
176
1.View方法 ActionResult解析:(抽象类)视图结果 子类: ...
分类:
其他好文 时间:
2017-11-04 13:21:09
阅读次数:
221
//引用using Newtonsoft.Json; using Newtonsoft.Json.Linq; public ActionResult JsonSample() { ResponseResult obj = new ResponseResult(); try { JObject jo ...
分类:
Web程序 时间:
2017-10-16 11:00:48
阅读次数:
160
如何实现从一个控制器跳入另一个控制器的视图 public ActionResult Login() { return View(); //返回当前控制器对应的视图,不加参数默认返回index return RedirectToRoute(new { controller = "Home", acti ...
分类:
Web程序 时间:
2017-10-11 15:30:42
阅读次数:
182
public ActionResult AddPost() { ResponseResult result = new ResponseResult(); StringBuilder strInfo = new StringBuilder(); strInfo.Append(string.Forma ...
分类:
Web程序 时间:
2017-09-26 13:04:44
阅读次数:
167
在MVC的每个action中,都可以指定一种返回页面的类型,可以是ActionResult,这表示返回的页面为view或者是一个PartialView,前台是一个全整页面,后台是页面的一部分。 在以ASPX为页面引擎时,PartialView被称为分部视图,扩展名为ASCX,与webform中的用户 ...
分类:
其他好文 时间:
2017-09-16 13:43:11
阅读次数:
155
public ActionResult InfoFrame() { List<Users> list = new List<Users>(); Users user = new Users(); if (Session["UserID"] == null)//判断是否没登录 { return Red ...
分类:
Web程序 时间:
2017-09-08 20:36:24
阅读次数:
193