摘要:
方法定义: private static T GetValueByKey(string key) where T : IConvertible { T localVal=default(T); string strType = ... 阅读全文
摘要:
本机安装的VS2013 开发环境,在IIS部署WebApi2.0时,应用程序池并没有.NET4.5的选项。网上搜索一番得知: 1、.NET4.5本质上还是4.0,属于递增式的更新,所以对IIS 来说看到的只有4.0而已; 2、项目部署后,若还是报500错误,或以下错误: IIS上部署MVC... 阅读全文
摘要:
报错信息:会话状态在此上下文中不可用protected void Application_Error(object sender, EventArgs e){//以此判断是否可用Sessionbool HadInitSession = (sender as HttpApplication).Cont... 阅读全文
摘要:
Controllers: public ActionResult Index() { return View(db.GuestBooks.ToList()); } // // GET: /Guest2/ ... 阅读全文
摘要:
一、Ueditor插件下载自:http://ueditor.baidu.com/website/二、将解压文件目录ueditor复制到项目根目录后, 修改以下几个文件配置: 1.访问路径配置:ueditor.config.js //为编辑器实例添加一个路径,这个不能被注释 ... 阅读全文
摘要:
/// /// 找零钱,返回人民币总张数 /// class MoneyNums { /// /// 定义人民币类别值 /// private decimal[] RMB = { 100... 阅读全文
摘要:
Microsoft在CLR中引入了可空值类型(nullable value type)的概念。FCL中定义System.Nullable类如下:[Serializable,StructLayout(LayoutKind.Sequential)]public struct Nullable where... 阅读全文
摘要:
1.首先创建一控制器文件UpFileController.cs:using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Web.Mvc;namespace Mvc4St... 阅读全文
摘要:
一.命令开启1.打开控制台:视图->其他窗口->程序包管理器控制台;2.启动数据库迁移,执行命令:enable-migrations 创建成功后会新增migrations目录等。 若报如下错误: PM> Enable-Migrations More than one context ... 阅读全文
摘要:
DELIMITER //CREATE PROCEDURE p_addscore(nums INT,OUT retrows INT)BEGINDECLARE i INT DEFAULT 0;add_loop:LOOP IF i >= nums THEN LEAVE add_loop; END IF;... 阅读全文