随笔分类 -  Asp.net mvc4技术

Asp.net mvc4技术
摘要:1.nuget下载PagedList包 2.PageListHelper类: 3.创建一个部分页_PagedListPartial.cshtml 4.Index页面调用: 阅读全文
posted @ 2016-07-18 13:59 大空白纸 阅读(2446) 评论(0) 推荐(0) 编辑
摘要:页面出现如下图: 第一种解决方案: 刚安装好IIS,这时需要注册IIS. 在Dos中进入Framework的安装文件夹 你将要发布的系统是什么.Net Framework版本,就注册什么版本 4.0版本进入 C:\Windows\Microsoft.NET\Framework\v4.0.30319 阅读全文
posted @ 2016-07-18 11:45 大空白纸 阅读(6684) 评论(1) 推荐(1) 编辑
摘要:使用的是asp.net MVC 上传图片。1.下载Kindeditor的对应的包2.html页面@{ Layout = null;} UploadByKindeditor 内容: 3... 阅读全文
posted @ 2015-11-26 17:11 大空白纸 阅读(3349) 评论(0) 推荐(0) 编辑
摘要:action代码:BusinessPublicContent pc = db.BusinessPublicContent.Where(m => m.BusinessPublicContentID == id).FirstOrDefault(); ViewBag.data = p... 阅读全文
posted @ 2015-11-25 18:19 大空白纸 阅读(2676) 评论(0) 推荐(0) 编辑
摘要://url加密与解密string res1 = HttpUtility.UrlEncode("7Z2K5Lgk/iI=");//值是7Z2K5Lgk%2fiI%3dstring res2 = HttpUtility.UrlEncode(res1);//值是: 7Z2K5Lgk%252fiI%253d... 阅读全文
posted @ 2015-06-01 21:17 大空白纸 阅读(232) 评论(0) 推荐(0) 编辑
摘要:如果url是 /home/index?id=3 直接Request就ok。但是如果路由设定为:{controller}/{action}/{id}url是 /home/index/3 这时想在页面View中获取参数id的值,该怎么获取?查了下资料好多人都利用Action获取到参数值后,用Viewda... 阅读全文
posted @ 2015-04-29 09:21 大空白纸 阅读(349) 评论(1) 推荐(1) 编辑
摘要://entity为空 是数据库上下文会验证实体验证 var entity = db.UserInfo.Where(u => u.Mobile == mobile).FirstOrDefault(); if (... 阅读全文
posted @ 2015-04-25 13:47 大空白纸 阅读(345) 评论(0) 推荐(0) 编辑
摘要:ViewBag.TopicInfoID = new SelectList(db.TopicInfo, "TopicInfoID", "TopicName", strategycategory.TopicInfoID); var list = db.StrategyCatego... 阅读全文
posted @ 2015-04-19 17:00 大空白纸 阅读(120) 评论(0) 推荐(0) 编辑
摘要:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;using System.Web.Script.Serialization;namespace ... 阅读全文
posted @ 2015-04-08 09:25 大空白纸 阅读(196) 评论(0) 推荐(0) 编辑