摘要: 一共有两个分页类,都可以使用(单独使用) using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Threading.Tasks; namespace Common{ 阅读全文
posted @ 2019-07-29 20:56 咖啡无眠 阅读(269) 评论(0) 推荐(0) 编辑
摘要: WinForm中Dispose()和Close()的区别 Close()会自动调用Dispose()方法,但是如果窗体是模态的,则不会调用 所以ShowDialog的时候,要用Dispose(),Show()用Close() 阅读全文
posted @ 2019-07-29 16:54 咖啡无眠 阅读(1500) 评论(0) 推荐(0) 编辑
摘要: caption { padding: 0 0 5px 0; width: 700px; font: italic 11px "Trebuchet MS" , Verdana, Arial, Helvetica, sans-serif; text-align: right; } th { font: 阅读全文
posted @ 2019-07-29 12:16 咖啡无眠 阅读(1098) 评论(0) 推荐(0) 编辑
摘要: 最近做的项目需要在Controller里重写一个static的方法,在方法内用常用的Server.MapPath会报一个错误:An object reference is required for the non-static field, method, or property 'Controll 阅读全文
posted @ 2019-07-28 19:43 咖啡无眠 阅读(642) 评论(0) 推荐(0) 编辑
摘要: 一个典型的EF应用大多数情况下是一个DbContext的派生类(derived class)来控制,通常可以使用该派生类调用DbContext的构造函数,来控制以下的东西: (1)、上下文如何连接到数据库(给定连接字符串) (2)、上下文是通过Code First语法计算模型还是使用EF 设计器 ( 阅读全文
posted @ 2019-07-26 09:32 咖啡无眠 阅读(426) 评论(0) 推荐(0) 编辑
摘要: <connectionStrings> <add name="connStr" connectionString="server=.;uid=home;pwd=;database=EFFristModel"/> <!--<add name="connStr" connectionString="Pr 阅读全文
posted @ 2019-07-25 16:09 咖啡无眠 阅读(657) 评论(0) 推荐(0) 编辑
摘要: USE [web1]GO/****** Object: StoredProcedure [dbo].[GetPageList] Script Date: 08/22/2014 15:02:14 ******/SET ANSI_NULLS ONGOSET QUOTED_IDENTIFIER ONGOA 阅读全文
posted @ 2019-07-04 18:41 咖啡无眠 阅读(235) 评论(0) 推荐(0) 编辑
摘要: 文件下载-》使用超链接直接指定要下载的文件 能被浏览器解析的文会被显示 不能被浏览器解析的文件会被下载-》实现:无论文件格式,都不使用浏览器显示,完成下载 指向一般处理程序,文件地址作为参数 修改响应头:ContentType = "application/octet-stream"; 设置头信息: 阅读全文
posted @ 2019-07-02 18:52 咖啡无眠 阅读(2070) 评论(0) 推荐(0) 编辑
摘要: 如果说,一个对象保证全局唯一,大家肯定会想到一个经典的设计模式:单例模式,如果要使用的对象必须是线程内唯一的呢? 数据槽:CallContext,ok看下msdn对callcontent的解释。 CallContext 是类似于方法调用的线程本地存储区的专用集合对象,并提供对每个逻辑执行线程都唯一的 阅读全文
posted @ 2019-06-22 18:03 咖啡无眠 阅读(786) 评论(0) 推荐(0) 编辑
摘要: asp.net 验证正则表达式 整数或者小数:^[0-9]+\.{0,1}[0-9]{0,2}$只能输入数字:"^[0-9]*$"。只能输入n位的数字:"^\d{n}$"。只能输入至少n位的数字:"^\d{n,}$"。只能输入m~n位的数字:。"^\d{m,n}$"只能输入零和非零开头的数字:"^( 阅读全文
posted @ 2019-06-18 15:16 咖啡无眠 阅读(307) 评论(0) 推荐(0) 编辑