随笔分类 -  Asp.net

摘要:在日常的开发中我们经常需要为页面添加注释和版权等信息,这样我们就需要每次去拷贝粘贴同样的文字,为了减少这种重复性的工作,我们可以把这些信息保存在Visual Studio 2012类库模版文件里1.找到你的VS图标 右键-属性--打开文件所在目录 然后找到如下列表--CSarp文件夹 快速... 阅读全文
posted @ 2014-10-29 14:08 Jimmy-Lee 阅读(1030) 评论(0) 推荐(0)
摘要://这个就是解密ConnString,用解密后的串连接数据库就行啦这里需要引入一个加密的dllDesEncrypt.dlldbHelper.ConnectionString = DecryptPassword(System.Configuration.ConfigurationManager.ConnectionStrings[connectionStringName].ConnectionString);private static string DecryptPassword(string conn){int pos= conn.IndexOf("Password=") 阅读全文
posted @ 2012-05-23 17:30 Jimmy-Lee 阅读(237) 评论(0) 推荐(1)
摘要:先上来代码: public static string DataTableToJSON(DataTable dt, string dtName) { StringBuilder sb = new StringBuilder(); StringWriter sw = new StringWriter(sb); using (JsonWriter jw = new JsonTextWriter(sw)) { JsonSerializer ser = new JsonSerializer(); ... 阅读全文
posted @ 2012-04-11 09:05 Jimmy-Lee 阅读(403) 评论(1) 推荐(1)
摘要:<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml"> <head> <meta http-equiv="Content-Type" content="text/html; charset=g 阅读全文
posted @ 2012-03-29 08:17 Jimmy-Lee 阅读(399) 评论(0) 推荐(0)
摘要:1.avi格式 View Code <object id="video" width="400" height="200" border="0" classid="clsid:CFCDAA03-8BE4-11cf-B84B-0020AFBBCCFA"> <param name="ShowDisplay" value="0"> <param name="ShowControls" value="1"> <param n 阅读全文
posted @ 2012-03-02 14:52 Jimmy-Lee 阅读(638) 评论(0) 推荐(0)
摘要:首先我把Media Player播放器做一个用户控件代码如下前台:View Code <%@ Control Language="C#" AutoEventWireup="true" CodeBehind="MedayPlayer.ascx.cs" Inherits="Web.MedayPlayer" %><script language="javascript" type="text/javascript"> <asp:Literal ID=& 阅读全文
posted @ 2012-03-01 16:46 Jimmy-Lee 阅读(356) 评论(0) 推荐(0)
摘要:一、IoC 简介IoC的全名是『Inversion of Control』,字面上的意思是『控制反转』,要了解这个名词的真正含意,得从『控制』这个词切入。一般来说,当设计师撰写一个Console程序时,控制权是在该程序上,它决定着何时该印出讯息、何时又该接受使用者输入、何时该进行数据处理,如程序1。View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Inversion_of_Control{ class Program { ... 阅读全文
posted @ 2012-02-29 22:26 Jimmy-Lee 阅读(230) 评论(0) 推荐(0)
摘要:一、IoC 简介IoC的全名是『Inversion of Control』,字面上的意思是『控制反转』,要了解这个名词的真正含意,得从『控制』这个词切入。一般来说,当设计师撰写一个Console程序时,控制权是在该程序上,它决定着何时该印出讯息、何时又该接受使用者输入、何时该进行数据处理,如程序1。View Code using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Inversion_of_Control{ class Program { ... 阅读全文
posted @ 2012-02-29 22:23 Jimmy-Lee 阅读(205) 评论(0) 推荐(0)
摘要:这里我们来说的是单元测试,它是项目成功和个人成功不可或缺的一部分,但是对于它,人们又存在着很多误解,单元测试其实是相对廉价而又简单的技术,但他能让你更高效的写出质量更好的代码。我们大多认为测试是一件麻烦的事情,他让我们无法专注于手头上的正经事“cutting code”它不是针对最终用户,项目经理和开发组长的工具,而是由程序员自己来完成,最终收益的也是程序员自己,我们是为了自身的利益去使用单元测试的,从而让我们的工作变的更加的轻松第一节:热情洋溢的阐述第二节:软件介绍第三节:开刀练手第四节:深入介绍Nunit第五节:测试指导Right-BICEP第六节:CORRECT边界条件第七节:使用Moc 阅读全文
posted @ 2012-02-21 19:55 Jimmy-Lee 阅读(1702) 评论(2) 推荐(3)
摘要:原文链接地址:http://www.codeproject.com/Tips/80953/Converting-VS2010-Solution-to-VS2008如果你使用VS2010的任何版本写代码,那么在VS2008中就不能打开VS2010的解决方案了,为此,通过以下三步就可以解决了一.对于工程名.sln;1.用你喜欢的编辑器打开sln文件,比如notepad++2.找到下面的字符串Microsoft Visual Studio Solution File, Format Version 11.00.# Visual Studio 2010. 并且用下面的字串替换Microsoft Vis 阅读全文
posted @ 2012-01-25 18:22 Jimmy-Lee 阅读(235) 评论(0) 推荐(0)