本篇体验MVC上传文件,从表单上传过渡到jquery异步上传。 MVC最基本的上传文件是通过form表单提交方式□ 前台视图部分 □ 控制器部分[HttpMethod.Post]public ActionResult FileUpload(HttpPostedFileBase uplo...
分类:
Web程序 时间:
2014-11-21 18:00:40
阅读次数:
254
[HttpPost] public ActionResult ExportExcel(FormCollection form) { string strHtml = form["hHtml"]; strHtml ...
分类:
Web程序 时间:
2014-11-21 10:20:14
阅读次数:
299
留资料,以后学习用1.后台 public ActionResult textPage() { return View(); } [HttpPost] public ActionResult textPage(...
分类:
数据库 时间:
2014-11-20 13:39:18
阅读次数:
144
Control: public ActionResult Index(int id=1) { int pageSize = 20; int totalItems = 0; using (MAction ac...
分类:
Web程序 时间:
2014-11-19 22:09:46
阅读次数:
551
一、首先是登录: public class AccountController : BaseController { public ActionResult Login() { //已经登录的,直接到默认首页 if (Ht...
分类:
Web程序 时间:
2014-11-19 17:58:32
阅读次数:
175
///
/// 获取评论列表
///
///
///
public ActionResult GetCommentList(int pageIndex=1)
{
try{
WebUser webuser= FunSession.GetSe...
分类:
Web程序 时间:
2014-11-18 00:27:27
阅读次数:
260
public ActionResult List(int oid, int pageIndex = DefaultPageIndex, int pageSize = Defaultpasesize) { OrdersOperator ordersOp...
分类:
Web程序 时间:
2014-11-17 15:43:55
阅读次数:
214
Controller 代码:public class SubArea2STIReportController : BaseController { [ActionDescription("分区2STI查询")] public ActionResult Index()...
分类:
Web程序 时间:
2014-11-17 13:47:18
阅读次数:
214
周末狂欢两天,这周工作任务又好多,几天没有学习。。。一、控制器和动作:从前面的内容我们可以看到控制器的动作基本有两个特点:(1)public修饰;(2)返回ActionResult。但动作并非必须返回ActionResult,可以是void的或其他,如下面两例: 1 public class Sim...
分类:
Web程序 时间:
2014-11-13 23:53:01
阅读次数:
281
创建用户管理相关视图第一步:添加视图打开UsersAdminController.cs将鼠标移动到public ActionResult Index()上右键》添加视图系统会弹出对话框什么也不用改直接“添加”第二步:在创建的视图上定义一个公开枚举模型在第一行添加 @model IEnumerable...
分类:
Web程序 时间:
2014-11-12 22:34:47
阅读次数:
415