51、app.config 连接字符串

<?xml version="1.0" encoding="utf-8"?>
<configuration><startup><supportedRuntimeversion="v4.0"sku=".NETFramework,Version=v4.5" /></startup><appSettings><addkey="dmsFolder"value="C:\local.dfs.com\Data\DMS\" /></appSettings><connectionStrings><!--<add name="dfs" connectionString="user id=ProferoTest;password=Pr0f3r0;Data Source=127.0.0.1;Database=databesename" />--><!--<add name="ConnectionString" connectionString="Data Source=.;Initial Catalog=ExpUsers;Persist Security Info=True;User ID=sa;password=mima;" providerName="System.Data.SqlClient" />--><addname="ConnectionString"connectionString=" Data Source=.;Initial Catalog=UserExp2;Persist Security Info=True;User ID=sa;password=mima;"providerName="System.Data.SqlClient" /></connectionStrings>
</configuration>

View Code

读取:

 string connString = ConfigurationManager.ConnectionStrings["ConnectionString"].ConnectionString.ToString();

记得添加引用 using System.Configuration;

50、常用设计模式

savechange 设计模式:工作单元模式 :一个业务对多张表的操作,只连一次数据库,完成条记录的更新

简单工厂:返回父类或者接口的多种形态

抽象工厂:通过反射创建

单例:类似静态类  可以继承  扩展  延迟加载.....保证程序只new一次   比如队列 就可以放在单列里面

49、.net  常用 ORM框架

对象关系映射(英语:Object Relational Mapping,简称ORM,或O/RM,或O/R mapping),是一种程序技术,用于实现面向对象编程语言里不同类型系统的数据之间的转换。从效果上说,它其实是创建了一个可在编程语言里使用的“虚拟对象数据库”。

EF:Entity Framework

NHibernate

Linq

Dapper

PetaPoco

转自:http://zhan.renren.com/h5/entry/3602888498046723643

48、二维码生成

后台代码:

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Web;namespaceJTZK_Handle
{public classHandleEr{public static stringGetEr(){string html = @"<div style=""text-align: center;border: solid 1px #cacaca; margin-top:20px""><p style=""border-bottom: solid 1px #cacaca; line-height: 40px;""><img align=""middle"" src=""/images/weixinico.png"" />&nbsp;微信扫一扫,分享到朋友圈</p><p style=""margin-bottom: 20px; margin-top: 20px;""><img src=""http://s.jiathis.com/qrcode.php?url={0}"" width=""140"" height=""130"" /></p> </div>";return string.Format(html, HttpContext.Current.Request.Url.ToString());}}
}

View Code

前台代码:

<%=JTZK_Handle.HandleEr.GetEr()%>

47、.net 中const 与readonly的区别???

const和readonly都是只读的。
但是const修饰的变量必须在声明时赋值。
readonly修饰的变量可以在声明时或者构造函数里赋值。
private const double pi=3.14;
class A { private readonly int a; public A(int v) { a=v; } }

46、asp.net MVC 导出txt文件

publicActionResult ExpData(){StringBuilder sb= newStringBuilder();string timeNow =DateTime.Now.ToString();Response.Clear();Response.Buffer= false;//通知浏览器 下载文件而不是打开Response.ContentType = "application/octet-stream";Response.AppendHeader("content-disposition", "attachment;filename=" + timeNow + ".txt;");var operLogList = operLogBLL.LoadEntities(o=>o.IsValid==1);foreach (var item inoperLogList){sb.Append("时间:" + item.CreateTime.ToString() + "\n");sb.Append("类别:" + item.Category.ToString() + "\n");sb.Append("域:" + item.DomainID.ToString() + "\n");sb.Append("用户名:" + item.AccountName.ToString() + "\n");sb.Append("内容:" + item.Content.ToString() + "\n");sb.Append("--------------------------------------------------\n\n");}Response.Write(sb);Response.Flush();Response.End();return newEmptyResult();}

View Code

//导出数据
function ExpData() {window.location.href= "/LogManager/ExpData";//MySuccess("导出成功!");};

45、评论插件

国外成功的案例是国内互联网创业者的风向标。在Disqus  http://disqus.com 获得巨大成功。在没美国很多网站都用此评论系统

社交评论插件的国内模仿者我见到的几家就是:

1、多说(http://www.duoshuo.com/ )

2、评论啦(http://www.pinglun.la/)

3、友言(http://uyan.cc/)

4、贝米(http://baye.me/)

44、动态解析二级域名

刚开始在网上找  看到了DomainRoute这个插件

按照教程弄了,确实好使 也能跑起来

可是之前的好多路由配置再改成这样的,不好改,而且这个这个没有控制器 和方法名的限制参数

而且这个插件和url转小写的插件不能一起用

最后还是打算自己在global里URL重写吧

--------------------------------------------------------------------------------------------------------------------------

请求报文  接收报文

http协议  返回的请求状态码

post请求  get请求

get请求接收 context.Request.QueryString["catalog"]

post请求接收 context.Request.Form["catalog"]

Response.Redirect重定向

 context.Response.Redirect("UserInfoList.ashx");

文件上传 可以用文件流的MD5 或者GUID做标识,时间不能唯一不建议

webform调用后台 变量方法

<strong>1.在前台html控件调用c#后台变量。</strong>在后台的类代码里定义一个字符串。如public partial classIndex : System.Web.UI.Page
{public string msg = "";
}
然后可以写方法改变此字符串的值。
前台调用也很简单:<input id="Text1" type="text" value="<%=msg%>"/>
<strong>2.在前台html调用c#后台方法</strong>后台有一个方法:public stringtest()
{return "message";
}
前台代码:<input id="Text2" type="text" value="<%=test()%>"/>
<strong>3.在前台js里调用c#后台变量</strong>后台代码:public partial classIndex : System.Web.UI.Page
{public string msg = "";
}
前台代码:<script>alert("<%=msg%>");</script>
<strong>4.在前台js里调用c#后台变量</strong>后台有一个方法:public stringtest()
{return "message";
}
前台代码:<script>alert("<%=test() %>");</script>
<strong>5,前台js里调用后台带参数的方法</strong>
public string test(stringa)
{return a+",我是参数传进来的";
}<script>alert("<%=test("021") %>");</script>
<strong>6,前台js里调用后台带参数的方法</strong>//商品信息
function getProInfo(t) {var result = "";result= MallPowerSite.order.ChangeOrderEdit.GetProductInfo(t).value;//后台的方法,注意这里不用双引号returnresult;
}

View Code

值得注意的是,要在js中调用C#的变量和函数返回的结果,js代码必须写在页面的<script>...</script>中,而不能写在独立的*.js文件中,这样会js会将*.js的C#代码作为字符串处理,而不是变量或者方法。

<%@ Page Language="C#"AutoEventWireup="true"CodeBehind="UserInfoList.aspx.cs"Inherits="CZBK.ItcastProject.WebApp._2015_5_29.UserInfoList" %>
<!DOCTYPE html>
<%@ Import Namespace="CZBK.ItcastProject.Model" %>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><title></title><scripttype="text/javascript">window.onload= function() {vardatas=document.getElementsByClassName("deletes");vardataLength=datas.length;for(vari= 0; i<dataLength; i++) {datas[i].onclick= function() {if(!confirm("确定要删除吗?")) {return false;}}}};</script><linkhref="../Css/tableStyle.css"rel="stylesheet" />
</head>
<body><formid="form1"runat="server"><div><ahref="AddUserInfo.aspx">添加用户</a><table> <tr><th>编号</th><th>用户名</th><th>密码</th><th>邮箱</th><th>时间</th><th>删除</th><th>详细</th><th>编辑</th></tr><%--   <%=StrHtml%>--%><%foreach(UserInfo userInfo in UserList){%><tr><td><%=userInfo.Id%></td><td><%=userInfo.UserName%></td><td><%=userInfo.UserPass%></td><td><%=userInfo.Email%></td><td><%=userInfo.RegTime.ToShortDateString()%></td><td><ahref="Delete.ashx?id=<%=userInfo.Id %>"class="deletes">删除</a></td><td>详细</td><td><ahref="EditUser.aspx?id=<%=userInfo.Id %>">编辑</a> </td></tr><%}%></table><hr/></div></form>
</body>
</html>

View Code

<%@ Page Language="C#"AutoEventWireup="true"CodeBehind="Fdcxm_Mx.aspx.cs"Inherits="WebApplication.Fdc.Fdcxm_Mx" %><htmlxmlns="http://www.w3.org/1999/xhtml">
<headid="Head1"runat="server"><title></title><linkhref="/Css/FDC.css"type="text/css"rel="stylesheet" />
</head>
<body><tableborder="0"cellspacing="1"><tr><tdcolspan="6"align="center"valign="middle"class="title_0"><%=this.XmFdcInfo.XmName%></td></tr></table><tableborder="0"cellspacing="1"><tr><tdalign="center"valign="middle"class="title_1">税款属期</td><tdalign="center"valign="middle"class="title_1">项目固定信息数据申报表</td><tdalign="center"valign="middle"class="title_1">项目按月信息数据申报表</td><tdalign="center"valign="middle"class="title_1">施工企业报送数据申报表</td></tr><tbodyid="tab"><tr><tdalign="center"valign="middle"><%=Convert.ToDateTime(this.YYS_SKSQ).ToString("yyyy-MM")%></td><tdalign="center"valign="middle"><ahref="#"onclick="top.frames['MainFrame'].WinClose1('/Fdc/Jcxx.aspx?YYS_SKSQ=<%=this.YYS_SKSQ %>&XM_CODE=<%=this.XmFdcInfo.XmCode%>', '<%=this.XmFdcInfo.XmName%>房地产固定信息');"><%if(this.GDSB_SH_JG== "审核未通过"|| this.GDSB_SH_JG== ""){%>数据申报<%}%><%else{%>数据修改<%}%></a></td><tdalign="center"valign="middle"><%if(this.GDSB_SH_JG== "审核已通过"){%><ahref="#"onclick="top.frames['MainFrame'].WinClose1('/Fdc/AysbMx.aspx?YYS_SKSQ=<%=this.YYS_SKSQ %>&XM_CODE=<%=this.XmFdcInfo.XmCode%>', '<%=this.XmFdcInfo.XmName%>按月数据申报信息');"><%if(this.AYSB_SH_JG== "审核未通过"|| this.AYSB_SH_JG== ""){%>数据申报<%}%><%else{%>数据修改<%}%></a><%}else{%>数据申报<%}%></td><tdalign="center"valign="middle"><%if(AYSB_SH_JG== "审核已通过" &&this.GDSB_SH_JG== "审核已通过" &&this.XmFdcInfo.XmZt != "尾盘"){%><ahref="#"onclick="top.frames['MainFrame'].WinClose1('/Fdc/SGDW.aspx?YYS_SKSQ=<%=this.YYS_SKSQ %>&XM_CODE=<%=this.XmFdcInfo.XmCode%>', '<%=this.XmFdcInfo.XmName%>报送施工企业信息');"><%if(this.SGDW_SH_JG== "审核未通过"|| this.SGDW_SH_JG== ""){%>数据申报<%}%><%else{%>数据修改<%}%></a><%}else{%>数据申报<%}%></td></tr><tr><tdalign="center"valign="middle"class="title_1">历史数据</td><tdalign="center"valign="middle"class="title_1">项目固定信息数据申报表</td><tdalign="center"valign="middle"class="title_1">项目按月信息数据申报表</td><tdalign="center"valign="middle"class="title_1">施工企业报送数据申报表</td></tr><%=this.Output%></tbody></table><scripttype="text/javascript"language="JavaScript">functiona() {alert("项目固定信息数据申报表,错误,请修改!");TopView();}functionTopView(){top.ymPrompt.close();top.ymPrompt.win({ message:'<div style="width:900px;height:550px;overflow-x: scroll;overflow-y: scroll;"><iframe id="MenuFrame" src="Fdc/AysbMx.aspx" height="100%" width="100%" frameborder="0" ></iframe></div>', width:905, height:580, title:"项目固定信息数据申报表", iframe:false, closeBtn:true, dragOut:false});    }<!--
varPtr=document.getElementById("tab").getElementsByTagName("tr");function$() {for(i=1;i<Ptr.length+1;i++) { Ptr[i-1].className=(i%2>0)?"t1":"t2"; }
}
window.onload=$;for(vari=0;i<Ptr.length;i++) {Ptr[i].onmouseover=function(){this.tmpClass=this.className;this.className= "t3";};Ptr[i].onmouseout=function(){this.className=this.tmpClass;};
}//--></script>
</body>
</html>

View Code

什么时候用aspx  是时候用ashx(一般处理程序)

建议:

如果有复杂的界面布局用aspx

如果没有布局例如删除,用ashx,或者返回json数据

15、

如果往本页即post又get请求,可以在form里放一个隐藏域(input)

如果有 runat="server" 就自动添加隐藏域,判断的时候 直接判断if(isPostBack)就可以了

<body><formid="form1"runat="server"><div>用户名:<inputtype="text"name="txtName" /><br/>密码:<inputtype="password"name="txtPwd" /><br/>邮箱:<inputtype="text"name="txtMail" /><br/><%--    <input type="hidden"name="isPostBack"value="aaa" />--%><inputtype="submit"value="添加用户" /></div></form>
</body>

View Code

16、分页

sql中的over函数和row_numbert()函数配合使用,可生成行号。可对某一列的值进行排序,对于相同值的数据行进行分组排序。

执行语句:

select row_number() over(order by AID DESC) as rowid,* from bb

dao

        /// <summary>///根据指定的范围,获取指定的数据/// </summary>/// <param name="start"></param>/// <param name="end"></param>/// <returns></returns>public List<UserInfo> GetPageList(int start,intend){string sql = "select * from(select *,row_number()over(order by id) as num from UserInfo) as t where t.num>=@start and t.num<=@end";SqlParameter[] pars={new SqlParameter("@start",SqlDbType.Int),new SqlParameter("@end",SqlDbType.Int)};pars[0].Value =start;pars[1].Value =end;DataTable da=SqlHelper.GetDataTable(sql, CommandType.Text, pars);List<UserInfo> list = null;if (da.Rows.Count > 0){list= new List<UserInfo>();UserInfo userInfo= null;foreach (DataRow row inda.Rows){userInfo= newUserInfo();LoadEntity(userInfo, row);list.Add(userInfo);}}returnlist;}/// <summary>///获取总的记录数/// </summary>/// <returns></returns>public intGetRecordCount(){string sql = "select count(*) from UserInfo";returnConvert.ToInt32(SqlHelper.ExecuteScalar(sql,CommandType.Text));}private voidLoadEntity(UserInfo userInfo, DataRow row){userInfo.UserName= row["UserName"] != DBNull.Value ? row["UserName"].ToString() : string.Empty;userInfo.UserPass= row["UserPass"] != DBNull.Value ? row["UserPass"].ToString() : string.Empty;userInfo.Email= row["Email"] != DBNull.Value ? row["Email"].ToString() : string.Empty;userInfo.Id= Convert.ToInt32(row["ID"]);userInfo.RegTime= Convert.ToDateTime(row["RegTime"]);}

View Code

bll

 /// <summary>///计算获取数据的访问,完成分页/// </summary>/// <param name="pageIndex">当前页码</param>/// <param name="pageSize">每页显示的记录数据</param>/// <returns></returns>public List<UserInfo> GetPageList(int pageIndex,intpageSize){int start=(pageIndex-1)*pageSize+1;int end = pageIndex *pageSize;returnUserInfoDal.GetPageList(start, end);}/// <summary>///获取总的页数/// </summary>/// <param name="pageSize">每页显示的记录数</param>/// <returns></returns>public int GetPageCount(intpageSize){int recoredCount = UserInfoDal.GetRecordCount();//获取总的记录数.int pageCount =Convert.ToInt32(Math.Ceiling((double)recoredCount /pageSize));returnpageCount;}

View Code

aspx

usingCZBK.ItcastProject.Model;usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceCZBK.ItcastProject.WebApp._2015_5_30
{public partial classNewList : System.Web.UI.Page{public string StrHtml { get; set; }public int PageIndex { get; set; }public int PageCount { get; set; }protected void Page_Load(objectsender, EventArgs e){int pageSize=5;intpageIndex;if(!int.TryParse(Request.QueryString["pageIndex"],outpageIndex)){pageIndex=1;}BLL.UserInfoService UserInfoService= newBLL.UserInfoService();int pagecount = UserInfoService.GetPageCount(pageSize);//获取总页数PageCount =pagecount;//对当前页码值范围进行判断pageIndex = pageIndex < 1 ? 1: pageIndex;pageIndex= pageIndex > pagecount ?pagecount : pageIndex;PageIndex=pageIndex;List<UserInfo>list= UserInfoService.GetPageList(pageIndex,pageSize);//获取分页数据StringBuilder sb = newStringBuilder();foreach (UserInfo userInfo inlist){sb.AppendFormat("<li><span>{0}</span><a href='#' target='_blank'>{1}</a></li>",userInfo.RegTime.ToShortDateString(),userInfo.UserName);}StrHtml=sb.ToString();}}
}

View Code

pagebarHelper

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;namespaceCommon
{public classPageBarHelper{public static string GetPagaBar(int pageIndex, intpageCount){if (pageCount == 1){return string.Empty;}int start = pageIndex - 5;//计算起始位置.要求页面上显示10个数字页码.if (start < 1){start= 1;}int end = start + 9;//计算终止位置.if (end >pageCount){end=pageCount;//重新计算一下Start值.start = end - 9 < 1 ? 1 : end - 9;}StringBuilder sb= newStringBuilder();if (pageIndex > 1){sb.AppendFormat("<a href='?pageIndex={0}' class='myPageBar'>上一页</a>", pageIndex - 1);}for (int i = start; i <= end; i++){if (i ==pageIndex){sb.Append(i);}else{sb.AppendFormat("<a href='?pageIndex={0}' class='myPageBar'>{0}</a>",i);}}if (pageIndex <pageCount){sb.AppendFormat("<a href='?pageIndex={0}' class='myPageBar'>下一页</a>", pageIndex + 1);}returnsb.ToString();}}
}

View Code

 <%=Common.PageBarHelper.GetPagaBar(PageIndex,PageCount)%>

17、http协议 request response server成员

http协议 超文本传输协议 包括请求响应报文  请求报文包括请求头 请求内容

request 成员

Files 接受文件 Request.Files["FileName"]

UrlReferrer 请求的来源

Url 请求的网址

UserHostAddress 访问者IP

Cookie 浏览器Cookie

MapPath 虚拟路径转物理路径 ../2016/hello.aspx -->E:\web\2016\hello.aspx

response 成员

Flush() 将缓冲区中的数据发送给用户

Clear() 清空缓冲区

ContentEncoding 输出流的编码

ContentType 输出流的内容类型 HTML(text/html)  普通文本(text/plain)  jpeg (image/JPEG)

server成员

Server.Transfer("Child.aspx")

Server.Execute("Child.aspx");

这两个是一样的 都是在后台访问其他的页面 达到ifram的效果

与Response.Redirect的区别。Transfer:服务端跳转,不会向浏览器返回任何内容,所以地址栏中的URL地址不变。

Server.HtmlEncode("<font color='red'></font>")

18、XSS跨站攻击

比如评论的时候,没有编码,别人写了JavaScript代码,直接可以跳转到别的网站

注释

服务器注释 不会显示到HTML <%--这是注释内容--%>

显示到HTML里 <!--这是注释内容-->

19、viewstate

当我们在写一个asp.net表单时, 一旦标明了 form runat=server ,那么,asp.net就会自动在输出时给页面添加一个隐藏域

<input type="hidden" name="__VIEWSTATE" value="">
MVC中没有
viewstate赋值

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceCZBK.ItcastProject.WebApp._2015_5_30
{public partial classViewStateDemo : System.Web.UI.Page{public int Count { get; set; }protected void Page_Load(objectsender, EventArgs e){int count = 0;if (ViewState["count"] != null){count= Convert.ToInt32(ViewState["count"]);count++;Count=count;}ViewState["count"] = Count;//当我们把数据给了ViewState对象以后,该对象会将数据进行编码,然后存到__VIEWSTATE隐藏域中,然后返回给浏览器。//当用户通过浏览器单击“提交”按钮,会向服务端发送一个POST请求那么__VIEWSTATE隐藏域的值也会提交到服务端,那么服务端自动接收__VIEWSTATE隐藏域的值,并且再反编码,重新赋值给ViewState对象。
}}
}

View Code

<%@ Page Language="C#"AutoEventWireup="true"CodeBehind="ViewStateDemo.aspx.cs"Inherits="CZBK.ItcastProject.WebApp._2015_5_30.ViewStateDemo" %><!DOCTYPE html><htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><title></title>
</head>
<body><formid="form1"runat="server"><div><span><%=Count%></span><inputtype="submit"value="计算" /></div></form>
</body>
</html>

View Code

20、cookie

存在浏览器中  指定时间:存在硬盘中,关闭浏览器也会存在,不指定时间存在浏览器内存中,关闭就没了

21、session

浏览器关闭就不见了  因为ID是一cookie的形式存在浏览器之前传送,没有指定过期时间,存在浏览器内存中

22、page_init()

和page_Load()一样都是自动执行,不过这个在page_Load之前执行

统一的验证:写一个pagebase继承system.web.UI.page  然后在Page_Init()方法里写验证

23、自动登录实现原理

如果勾选了自动登录,把用户名和密码存在cookie中 记得加密,下次登录的时候直接进入get请求,给session赋值

http://www.liaoxuefeng.com/article/00146129217054923f7784c57134669986a8875c10e135e000

usingCZBK.ItcastProject.Model;usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceCZBK.ItcastProject.WebApp._2015_5_31
{public partial classUserLogin : System.Web.UI.Page{public string Msg { get; set; }public string UserName { get; set; }protected void Page_Load(objectsender, EventArgs e){if(IsPostBack){//string userName = Request.Form["txtName"];//UserName = userName;if (CheckValidateCode())//先判断验证码是否正确.
{CheckUserInfo();}else{//验证码错误Msg = "验证码错误!!";}}else{//判断Cookie中的值。自动登录
CheckCookieInfo();}}#region 判断用户名密码是否正确protected voidCheckUserInfo(){//获取用户输入的用户名和密码.string userName = Request.Form["txtName"];UserName=userName;string userPwd = Request.Form["txtPwd"];//校验用户名密码.BLL.UserInfoService UserInfoService = newBLL.UserInfoService();string msg = string.Empty;UserInfo userInfo= null;//判断用户名与密码if (UserInfoService.ValidateUserInfo(userName, userPwd, out msg, outuserInfo)){//判断用户是否选择了“自动登录”if (!string.IsNullOrEmpty(Request.Form["autoLogin"]))//页面上如果有多个复选框时,只能将选中复选框的的值提交到服务端。
{HttpCookie cookie1= new HttpCookie("cp1",userName);HttpCookie cookie2= new HttpCookie("cp2", Common.WebCommon.GetMd5String(Common.WebCommon.GetMd5String(userPwd)));cookie1.Expires= DateTime.Now.AddDays(7);cookie2.Expires= DateTime.Now.AddDays(7);Response.Cookies.Add(cookie1);Response.Cookies.Add(cookie2);}Session["userInfo"] =userInfo;Response.Redirect("UserInfoList.aspx");}else{Msg=msg;}}#endregion#region 校验Cookie信息.protected voidCheckCookieInfo(){if (Request.Cookies["cp1"] != null && Request.Cookies["cp2"] != null){string userName = Request.Cookies["cp1"].Value;string userPwd = Request.Cookies["cp2"].Value;//校验BLL.UserInfoService UserInfoService = newBLL.UserInfoService();UserInfo userInfo=UserInfoService.GetUserInfo(userName);if (userInfo != null){//注意:在添加用户或注册用户时一定要将用户输入的密码加密以后在存储到数据库中。if (userPwd ==Common.WebCommon.GetMd5String(Common.WebCommon.GetMd5String(userInfo.UserPass))){Session["userInfo"] =userInfo;Response.Redirect("UserInfoList.aspx");}}Response.Cookies["cp1"].Expires = DateTime.Now.AddDays(-1);Response.Cookies["cp2"].Expires = DateTime.Now.AddDays(-1);}}#endregion#region 判断验证码是否正确protected boolCheckValidateCode(){bool isSucess = false;if (Session["validateCode"] != null)//在使用Session时一定要校验是否为空
{string txtCode = Request.Form["txtCode"];//获取用户输入的验证码。string sysCode = Session["validateCode"].ToString();if(sysCode.Equals(txtCode, StringComparison.InvariantCultureIgnoreCase)){isSucess= true;Session["validateCode"] = null;}}returnisSucess;}#endregion}
}

View Code

24、request[""] 自动识别post get

POST GET:context.request["name"]  post:context.request.form["name"]  get:context.request.Querystring["name"]

25、手写异步请求

 <script type="text/javascript">$(function() {$("#btnGetDate").click(function() {//开始通过AJAX向服务器发送请求.varxhr;if (XMLHttpRequest) {//表示用户使用的高版本IE,谷歌,狐火等浏览器xhr = newXMLHttpRequest();}else {//低IExhr=new ActiveXObject("Microsoft.XMLHTTP");}xhr.open("get", "GetDate.ashx?name=zhangsan&age=12", true);xhr.send();//开始发送//回调函数:当服务器将数据返回给浏览器后,自动调用该方法。xhr.onreadystatechange = function() {if (xhr.readyState == 4) {//表示服务端已经将数据完整返回,并且浏览器全部接受完毕。if (xhr.status == 200) {//判断响应状态码是否为200.
alert(xhr.responseText);}}}});});</script>

View Code

<script src="../Js/jquery-1.7.1.js"></script><script type="text/javascript">$(function() {$("#btnPost").click(function() {varxhr;if(XMLHttpRequest) {xhr= newXMLHttpRequest();}else{xhr= new ActiveXObject("Microsoft.XMLHTTP");}xhr.open("post", "GetDate.ashx", true);xhr.setRequestHeader("Content-Type", "application/x-www-form-urlencoded");xhr.send("name=zhangsan&pwd=123");xhr.onreadystatechange= function() {if (xhr.readyState == 4) {if (xhr.status == 200) {alert(xhr.responseText);}}}});});</script>

View Code

26、统一布局

webform:ifram 母版页 (或者用第三方框架如fineUI) VTemplate模板  MVC:razor视图

27、缓存cache

和session的区别

每个用户都有自己单独的session

但是cache的数据是大家共享的

相同:都放在服务器内存中

usingCZBK.ItcastProject.Model;usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Caching;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceCZBK.ItcastProject.WebApp._2015_6_6
{public partial classCacheDemo : System.Web.UI.Page{protected void Page_Load(objectsender, EventArgs e){//判断缓存中是否有数据.if (Cache["userInfoList"] == null){BLL.UserInfoService UserInfoService= newBLL.UserInfoService();List<UserInfo> list =UserInfoService.GetList();//将数据放到缓存中。//Cache["userInfoList"] = list;//第二种赋值方式Cache.Insert("userInfoList", list);//赋值的重载方法  可以指定缓存时间//不推荐用这么多参数的重载,这里只是介绍一下,缓存依赖性什么的完全没必要,在数据库插入的时候做一下操作就可以了Cache.Insert("userInfoList", list, null, DateTime.Now.AddSeconds(5), TimeSpan.Zero, System.Web.Caching.CacheItemPriority.Normal, RemoveCache);Response.Write("数据来自数据库");//Cache.Remove("userInfoList");//移除缓存
}else{List<UserInfo> list = (List<UserInfo>)Cache["userInfoList"];Response.Write("数据来自缓存");}}protected void RemoveCache(string key, objectvalue, CacheItemRemovedReason reason){if (reason ==CacheItemRemovedReason.Expired){//缓存移除的原因写到日志中。
}}}
}

View Code

文件缓存依赖项

usingSystem;usingSystem.Collections.Generic;usingSystem.IO;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Caching;usingSystem.Web.UI;usingSystem.Web.UI.WebControls;namespaceCZBK.ItcastProject.WebApp._2015_6_6
{public partial classFileCacheDep : System.Web.UI.Page{protected void Page_Load(objectsender, EventArgs e){string filePath = Request.MapPath("File.txt");if (Cache["fileContent"] == null){//文件缓存依赖.CacheDependency cDep = newCacheDependency(filePath);string fileContent =File.ReadAllText(filePath);Cache.Insert("fileContent", fileContent, cDep);Response.Write("数据来自文件");}else{Response.Write("数据来自缓存:"+Cache["fileContent"].ToString());}}}
}

View Code

http://www.cnblogs.com/xiaoshi657/p/5570705.html

28、页面缓存

webform

在页面加<%@ OutputCache Duration="5" VaryByParam="*"%> 就可以了,如果有参数VaryByParam="id" 两个参数VaryByParam="id;type"  所有参数VaryByParam="*"

<%@ Page Language="C#"AutoEventWireup="true"CodeBehind="ShOWDetail.aspx.cs"Inherits="CZBK.ItcastProject.WebApp._2015_6_6.ShOWDetail" %>
<%@ OutputCache Duration="5"VaryByParam="*"%>
<!DOCTYPE html>
<htmlxmlns="http://www.w3.org/1999/xhtml">
<headrunat="server">
<metahttp-equiv="Content-Type"content="text/html; charset=utf-8"/><title></title>
</head>
<body><formid="form1"runat="server"><div><asp:DetailsViewID="DetailsView1"runat="server"Height="50px"Width="125px"></asp:DetailsView></div></form>
</body>
</html>

View Code

MVC

在MVC中要如果要启用页面缓存,在页面对应的Action前面加上一个OutputCache属性即可。

[HandleError]public classHomeController : Controller
{
[OutputCache(Duration= 5, VaryByParam = "none")]publicActionResult Index()
{returnView();
}
}

View Code

http://www.cnblogs.com/iamlilinfeng/p/4419362.html#t5

29、session分布式存储方案

其他机器:session状态服务器,单独一台机器,专门记录所有机器的session状态

数据库

上面两个性能太低,微软给的解决方案,不推荐用。建议用memcache,redis

30、错误页面配置

mode 值

On 指定启用自定义错误。如果没有指定 defaultRedirect,用户将看到一般性错误。
Off 指定禁用自定义错误。这允许显示详细的错误。
 RemoteOnly 指定仅向远程客户端端显示自定义错误,并向本地主机显示 ASP.NET 错误。这是默认值。

<configuration><system.web><customErrorsmode="On"defaultRedirect="MyErrorPage.html"><!--默认错误页面--><errorstatusCode="403"redirect="NoAccess.htm" /><!--个别错误指定错误页面--><errorstatusCode="404"redirect="FileNotFound.html" /></customErrors></system.web>
</configuration>

ps:iis中有一错误页面 选项 也需要配置一下

31、队列写在内存中

new线程  比去线程池中取线程效率低很多

线程池的线程是自动创建的,我们控制不了,如果想控制线程就要自己new了

全部代码

usingSystem;usingSystem.Collections.Generic;usingSystem.ComponentModel;usingSystem.Data;usingSystem.Drawing;usingSystem.Linq;usingSystem.Text;usingSystem.Threading;usingSystem.Threading.Tasks;usingSystem.Windows.Forms;namespaceWindowsFormsApplication1
{public partial classForm1 : Form{private static readonly object obj = new object();publicForm1(){InitializeComponent();TextBox.CheckForIllegalCrossThreadCalls= false;}/// <summary>///单线程:当程序执行时,有一个线程负责执行该代码,没有办法与用户进行其它的交互,所以窗体界面卡死了。(与窗体界面交互的线程叫UI线程。)/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button1_Click(objectsender, EventArgs e){int a = 0;for (int i = 0; i < 999999999; i++){a=i;}MessageBox.Show(a.ToString());}/// <summary>///将计算的任务交给另外一个线程来执行,UI线程还是负责与用户进行打交道。默认情况线程所执行的任务完成了,该线程也就终止了。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>//bool isStop = true;//推荐使用这种方式结束线程,不是thread.Abort()private void button2_Click(objectsender, EventArgs e){ThreadStart threadStart=newThreadStart(StartCacul);Thread thread= newThread(threadStart);//thread.Priority = ThreadPriority.Normal;//建议.//thread.Name = "shit";//thread.Abort();//强制终止线程。尽量不要该方法//thread.Join(1000);//主线程会阻塞(睡眠、等待1000毫秒)等待thread.Start();//将该线程标记可运行状态。
}private voidStartCacul(){//while (isStop)//推荐使用这种方式结束线程,不是thread.Abort()//{int a = 0;for (int i = 0; i < 999999999; i++){a=i;}//MessageBox.Show(a.ToString());this.txtNum.Text =a.ToString();//}
}/// <summary>///后台线程:当窗体关闭该线程也就结束了。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button3_Click(objectsender, EventArgs e){Thread thread1= newThread(StartCacul);thread1.IsBackground= true;thread1.Start();}/// <summary>///委托调用带参数的方法/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button4_Click(objectsender, EventArgs e){List<int> list = new List<int>() {1,2,3,4,5};ParameterizedThreadStart paramThread= newParameterizedThreadStart(ShowList);Thread thread2= newThread(paramThread);thread2.IsBackground= true;thread2.Start(list);//传递参数
}private void ShowList(objectobj){List<int> list = (List<int>)obj;foreach (int i inlist){MessageBox.Show(i.ToString());}}/// <summary>///解决跨线程访问。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button5_Click(objectsender, EventArgs e){Thread thread3= newThread(ShowStartCacul);thread3.IsBackground= true;thread3.Start();}private voidShowStartCacul(){int a = 0;for (int i = 0; i < 999999999; i++){a=i;}if (this.txtNum.InvokeRequired)//解决跨线程访问。如果该条件成立表示跨线程访问.
{//Invoke:找到最终创建文本框的线程,然后有该线程为文本框赋值。this.txtNum.Invoke(new Action<TextBox, string>(SetValue), this.txtNum, a.ToString());}}private void SetValue(TextBox txt,stringvalue){txt.Text=value;}/// <summary>///线程同步:当多个线程同时在操作同一个资源时,会出现并发问题(例如操作文件)。这是可以加锁。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button6_Click(objectsender, EventArgs e){Thread t1= newThread(SetTextValue);t1.IsBackground= true;t1.Start();Thread t2= newThread(SetTextValue);t2.IsBackground= true;t2.Start();}private voidSetTextValue(){lock(obj){//执行操作。写文件。for (int i = 0; i <=2000; i++){int a = Convert.ToInt32(this.txtNum.Text);a++;this.txtNum.Text =a.ToString();}}}}
}

View Code

32、HttpModule

创建httpapplacation之后 会遍历所有的httpmodule  包括web.config中配置的

https://www.cnblogs.com/xiaoshi657/p/6529777.html

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Text;usingSystem.Threading.Tasks;usingSystem.Web;namespaceCZBK.ItcastProject.Common
{//过滤器。public classCheckSessionModule:IHttpModule{public voidDispose(){throw newNotImplementedException();}public voidInit(HttpApplication context){//URL重写。//context.AcquireRequestState+=context_AcquireRequestState;
}public void context_AcquireRequestState(objectsender, EventArgs e){//判断Session是否有值.HttpApplication application =(HttpApplication)sender;HttpContext context=application.Context;string url = context.Request.Url.ToString();//获取用户请求的URL地址.if (url.Contains("AdminManger"))//网站程序所有的后台页面都放在该文件夹中。
{if (context.Session["userInfo"] == null){context.Response.Redirect("/2015-02-27/Login.aspx");}}}}
}

View Code

33、Global

usingSystem;usingSystem.Collections.Generic;usingSystem.Linq;usingSystem.Web;usingSystem.Web.Security;usingSystem.Web.SessionState;namespaceCZBK.ItcastProject.WebApp
{public classGlobal : System.Web.HttpApplication{/// <summary>///整个WEB应用程序的入口。相当于Main函数.该方法只执行一次,当WEB应用程序第一次启动时,执行该方法,后续请求其它页面该方法不在执行。该方法中一般完成对整个网站的初始化。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Application_Start(objectsender, EventArgs e){//这个只执行一次,其他的是用户请求一次执行一次,这个和用户请求无关,只有服务器上网站启动的时候,初始化启动
}/// <summary>///开启会话的时候执行该方法。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Session_Start(objectsender, EventArgs e){//统计访问人数.//访问人数+1.//Application:服务端状态保持机制,并且放在该对象中的数据大家共享的。使用该对象时必须加锁。
Application.Lock();if (Application["count"] != null){int count = Convert.ToInt32(Application["count"]);count++;Application["count"] =count;//向永久保存访客人数必须将该数据存储到文件或数据库中。
}else{Application["count"] = 1;}Application.UnLock();}protected void Application_BeginRequest(objectsender, EventArgs e){}protected void Application_AuthenticateRequest(objectsender, EventArgs e){}/// <summary>///注意的方法。该方法会捕获程序中(所有)没有处理的异常。并且将捕获的异常信息写到日志中。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Application_Error(objectsender, EventArgs e){HttpContext.Current.Server.GetLastError();//捕获异常信息.//将捕获的异常信息写到日志中。
}/// <summary>///会话结束的时候执行该方法。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Session_End(objectsender, EventArgs e){//不是实时的,和session的默认有效期是20分钟有关
}/// <summary>///整个应用程序结束的时候执行。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>protected void Application_End(objectsender, EventArgs e){}}
}

View Code

34、进程

//获取所有的进程的信息//Process[] ps=Process.GetProcesses();//foreach (Process p in ps)//{//    //p.Kill();//Console.WriteLine(p.ProcessName);//}//获取当前进程//Process p= Process.GetCurrentProcess();//获取当前的进程//Console.WriteLine(p.ProcessName);//启动别的进程//Process.Start("notepad.exe");//flv.  ffmpeg.exe//很好的视频转换工具//视频转码解决方案,用户传到服务器,通过进行启动第三方软件(如:ffmpeg.exe)进行转换

View Code

35、线程

        /// <summary>///将计算的任务交给另外一个线程来执行,UI线程还是负责与用户进行打交道。默认情况线程所执行的任务完成了,该线程也就终止了。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>//bool isStop = true;//推荐使用这种方式结束线程,不是thread.Abort()private void button2_Click(objectsender, EventArgs e){ThreadStart threadStart=newThreadStart(StartCacul);Thread thread= newThread(threadStart);//thread.Priority = ThreadPriority.Normal;//建议.//thread.Name = "shit";//thread.Abort();//强制终止线程。尽量不要该方法//thread.Join(1000);//主线程会阻塞(睡眠、等待1000毫秒)等待thread.Start();//将该线程标记可运行状态。
}private voidStartCacul(){//while (isStop)//推荐使用这种方式结束线程,不是thread.Abort()//{int a = 0;for (int i = 0; i < 999999999; i++){a=i;}//MessageBox.Show(a.ToString());this.txtNum.Text =a.ToString();//}
}

View Code

/// <summary>///后台线程:当窗体关闭该线程也就结束了。/// </summary>/// <param name="sender"></param>/// <param name="e"></param>private void button3_Click(objectsender, EventArgs e){Thread thread1= newThread(StartCacul);thread1.IsBackground= true;//这个值表示窗体关闭,线程就关闭
thread1.Start();}

View Code

线程池:

usingSystem;usingSystem.Threading;namespaceThreadDemo
{classprogram{static voidMain(){intnWorkThreads;intnCompletionPortThreads;ThreadPool.GetMaxThreads(out nWorkThreads, outnCompletionPortThreads);Console.WriteLine("Max worker threads: {0}, I/O completion threads: {1}",nWorkThreads, nCompletionProtThreads);for(int i = 0; i < 5; i++){ThreadPool.QueueUserWorkItem(JobForAThread);}Thread.Sleep(3000);}static void JobForAThread(objectstate){for(int i = 0; i < 3; i++){Console.WriteLine("loop {0}, running inside pooled thread {1}", i, Thread.CurrentThread.ManagedThreadId);Thread.Sleep(50);}}}
}

View Code

36、redis队列

刚刚百度了一下redis的队列,大致应该是两个redis的方法

EnqueueItemOnList 将一个元素存入指定ListId的List<T>的头部
DequeueItemFromList 将指定ListId的List<T>末尾的那个元素出列,返回出列元素

应用:

public classMyExceptionFilterAttribute : HandleErrorAttribute{//版本2:使用Redis的客户端管理器(对象池)public static IRedisClientsManager redisClientManager = new PooledRedisClientManager(new string[] {//如果是Redis集群则配置多个{IP地址:端口号}即可//例如: "10.0.0.1:6379","10.0.0.2:6379","10.0.0.3:6379""127.0.0.1:6379"});//从池中获取Redis客户端实例public static IRedisClient redisClient =redisClientManager.GetClient();public override voidOnException(ExceptionContext filterContext){//将异常信息入队redisClient.EnqueueItemOnList("ExceptionLog", filterContext.Exception.ToString());//跳转到自定义错误页filterContext.HttpContext.Response.Redirect("~/Common/CommonError.html");base.OnException(filterContext);}}

View Code

http://www.cnblogs.com/edisonchou/p/3825682.html

ps:log4net 早期版本不支持多线程 log4net 1.2.11版本以上支持

37、application19事件

38、lenght

循环的时候 尽量放在外面  否者每次循环都计算一次  不能for(int i=0,i<a.lenght,i++){}

39、反编译软件 reflector  IL Spy

40、判断字符串中是否存在某段字符

indexOf Contains

41、去掉最后一个逗号

RegionsStr = RegionsStr.Remove(RegionsStr.LastIndexOf(","), 1);   //去掉最后一个逗号

42、读取xml

usingNewtonsoft.Json;usingSystem;usingSystem.Collections.Generic;usingSystem.Configuration;usingSystem.Linq;usingSystem.Web;usingSystem.Xml;usingWebCenter.Model;namespaceWebCenter.Service
{/// <summary>///Index 的摘要说明/// </summary>public classIndex : IHttpHandler{protected readonly string CityIpConfigXMLPath = System.Web.HttpContext.Current.Server.MapPath("/config/CityIpConfigXML.xml");public voidProcessRequest(HttpContext context){string _province = context.Request.QueryString["_province"];string _city = context.Request.QueryString["_city"];City city=GetSkipCity(_province, _city);context.Response.ContentType= "text/plain";context.Response.Write("{status:'200',data:" + JsonConvert.SerializeObject(city) + "}");}/// <summary>///根据当前登录的IP的省份和城市,返回要跳转的城市/// </summary>/// <param name="ProvinceName">省份</param>/// <param name="CityName">城市</param>/// <returns></returns>public City GetSkipCity(string ProvinceName, stringCityName){City citymodel=null;string SkipCityName = string.Empty;XmlDocument xd= newXmlDocument();xd.Load(CityIpConfigXMLPath);//获取根节点XmlNode root =xd.DocumentElement;//获取节点列表XmlNodeList ProvinceList =root.ChildNodes;foreach (XmlNode Province inProvinceList){if (ProvinceName == Province.Attributes["ProvinceName"].Value.ToString()){foreach (XmlNode city inProvince){if (CityName == city.Attributes["CityName"].Value.ToString()){citymodel= newCity();citymodel.CityCode= city.Attributes["CityCode"].Value.ToString();citymodel.CityName= city.Attributes["SkipCity"].Value.ToString();citymodel.CityID= city.Attributes["CityValue"].Value.ToString();citymodel.CitySkipUrl= city.Attributes["CitySkipUrl"].Value.ToString();returncitymodel;}}if (citymodel==null){foreach (XmlNode province inProvince){if (province.Attributes["CityName"].Value.ToString() == "其他"){citymodel= newCity();citymodel.CityCode= province.Attributes["CityCode"].Value.ToString();citymodel.CityName= province.Attributes["SkipCity"].Value.ToString();citymodel.CityID= province.Attributes["CityValue"].Value.ToString();citymodel.CitySkipUrl= province.Attributes["CitySkipUrl"].Value.ToString();returncitymodel;}}}}}if (citymodel==null){foreach (XmlNode province inProvinceList){if (province.Attributes["ProvinceName"].Value.ToString() == "其他"){citymodel= newCity();citymodel.CityName= province.Attributes["SkipDafualt"].Value.ToString();citymodel.CitySkipUrl= province.Attributes["CitySkipUrl"].Value.ToString();returncitymodel;}}}returncitymodel;}public boolIsReusable{get{return false;}}}
}

View Code

<?xml version="1.0" encoding="utf-8"?>
<CityIpConfig><ProvinceIpProvinceName="北京"><CityIpCityName="北京"SkipCity="北京"CityCode=""CityValue=""CitySkipUrl="http://webbj.imtfc.com/Index.html" ></CityIp></ProvinceIp><ProvinceIpProvinceName="福建"><CityIpCityName="厦门"SkipCity="厦门"CityCode="XM"CityValue="4"CitySkipUrl="http://webcenter.imtfc.com/WebConstruction.html" >"</CityIp><CityIpCityName="福州"SkipCity="福州"CityCode="FZ"CityValue="3"CitySkipUrl="http://webcenter.imtfc.com/WebConstruction.html" ></CityIp><CityIpCityName="龙岩"SkipCity="厦门"CityCode="XM"CityValue="4"CitySkipUrl="http://webcenter.imtfc.com/WebConstruction.html" ></CityIp><CityIpCityName="泉州"SkipCity="厦门"CityCode="XM"CityValue="4"CitySkipUrl="http://webcenter.imtfc.com/WebConstruction.html" ></CityIp><CityIpCityName="其他"SkipCity="福州"CityCode="FZ"CityValue="3"CitySkipUrl="http://webcenter.imtfc.com/WebConstruction.html" ></CityIp></ProvinceIp><ProvinceIpProvinceName="其他"SkipDafualt="北京"CitySkipUrl="http://webbj.imtfc.com/Index.html"></ProvinceIp>
</CityIpConfig>

View Code

43、list取随机

            Random rd = newRandom();List<string> liststr = new List<string>();liststr.Add("aaa");liststr.Add("bbb");liststr.Add("ccc");liststr.Add("111");liststr.Add("222");liststr.Add("333");//随机一个var s = liststr.OrderBy(_ =>Guid.NewGuid()).First();//随机两个var ss = liststr.OrderBy(_ => Guid.NewGuid()).Take(2);//乱序var sss = liststr.OrderBy(o => rd.Next(0, liststr.Count())).ToList();

View Code

2、C#读取web.config文件信息

web.config

<?xml version="1.0"?>
<!--有关如何配置 ASP.NET 应用程序的详细信息,请访问http://go.microsoft.com/fwlink/?LinkId=169433-->
<configuration><appSettings><addkey="name"value="name1"/></appSettings>
</configuration>

C#读取

 string name = System.Web.Configuration.WebConfigurationManager.AppSettings["name"];System.Configuration.ConfigurationManager.AppSettings["SqlConnectionStr"]; 

C#设置

 System.Web.Configuration.WebConfigurationManager.AppSettings.Set("name", "name2");

1、常用技术、框架

首先C#基础应该熟悉,不要把暂时用不到而却常用的东西忘掉。

数据库

应该掌握oracle,毕竟工作这么多年一直用的oracle

MSSQL、SQLServer了解即可,毕竟SQL相似度很高。

C#开发框架:

MVC  EF  三层

第三方组件

Log4net  日志

json.net  json转换

Npoi     office处理

前台web框架

easyUI   js前端框架

bootstrap  很好的

LigerUI

extjs

控件、技术

ECharts 图标 大文件上传

有时间可以了解一下安卓开发,U3D开发。

先整理这些,以后想起来什么再写

Lucene.Net+盘古分词

高清楚 WEBAPI

T4  代码生成器     powerde..  Npoi   Log4

转载于:https://www.cnblogs.com/xiaoshi657/p/5526345.html

【知识碎片】Asp.Net 篇相关推荐

  1. 重构碎片化知识_《碎片化与重构》之如何整合知识碎片

    下去读一读西蒙斯的<网络时代的知识和学习--走向联通>这本书,联通主义就是西蒙斯提出来的,在网络时代,知识就像一条河流或管道里的石油,知识的更新速度快,成倍甚至是指数级的增长,然而知识的半 ...

  2. 重构碎片化知识_知识碎片化,思维导图重构你的思维体系

    原标题:知识碎片化,思维导图重构你的思维体系 如何解决碎片化的学习方式? 思维导图重构你的思维体系... 作为校长或教师的你,有没有这样的经历: 备课的时候,突然就会来一个电话,或者一条微信,于是你不 ...

  3. iOS开发基础知识--碎片44

    iOS开发基础知识--碎片44  iOS开发基础知识--碎片44 1:App跳转至系统Settings 跳转在IOS8以上跟以下是有区别的,如果是IOS8以上可以如下设置: NSURL *url = ...

  4. c# 找出目录下的所有子目录_C# 基础知识系列- 14 IO篇 文件的操作(2)

    前接上一篇内容. 如果是第一次捧场的小伙伴,为了您阅读的连贯性,烦请扫一眼<C# 基础知识系列- 14 IO篇 文件的操作(1)>.本篇是IO之文件操作的第二篇,介绍一下目录和路径的相关类 ...

  5. iOS开发基础知识--碎片27

     iOS开发基础知识--碎片27 1:iOS中的round/ceil/floorf extern float ceilf(float); extern double ceil(double); ext ...

  6. 电脑基础知识精选(硬件篇)

    电脑基础知识精选(硬件篇) 电脑基础知识 一.处理器 CPU 二.内存 RAM 三 .硬盘 Disk 四.显卡 GPU 五.主板 Motherboard 六.电源和显示器 七.选配电脑常见问答 八.如 ...

  7. 安卓开发必备知识体系:Java篇

    大家好我是张拭心,自从各位朋友帮点广X开始,我发现我每天更有奔头了,走起路来也更有劲了,说啥也得更新的勤快一点.不过放心,我一定推送有价值的内容给大家,还请朋友们照旧动动手指点点底部的那个小东东支持, ...

  8. 推广知识小结(名词篇CPA、CPS、CPC、CPM、CPT、CPD)

    推广知识小结(名词篇) 一.CPC 二.CPM 三.CPA 四.CPS 五.CPT 六.CPD 一.CPC CPC,这一种推广模式全称为:Cost Per Click.这一种推广方式是按照点击量来进行 ...

  9. iOS开发基础知识--碎片37

    iOS开发基础知识--碎片37 iOS开发基础知识--碎片37 iOS开发基础知识--碎片37 1:iOS 使用NJKWebViewProgress做webview进度条 引入头文件: #import ...

  10. iOS开发基础知识--碎片41

    iOS开发基础知识--碎片41 1:UIWebView加载本地的HTML NSString *path = [[NSBundle mainBundle] bundlePath]; NSURL *bas ...

最新文章

  1. “阿里巴巴大数据系统体系”学习笔记-纲领篇
  2. std::ios::sync_with_stdio(false);
  3. Linux环境搭建 | 手把手教你配置Linux虚拟机
  4. MVC架构在Asp.net中的应用和实现
  5. Redis最佳实践指南
  6. 网安入门须知:注释的危害居然这么大?——注释漏洞导致的信息泄露
  7. 将高德坐标拾取工具放入Element UI 对话框
  8. 安装tomcat时出错:failed to install tomcat6 service问题的解决方法
  9. 2.1 软件开发生命周期模型
  10. iOS一代码搞定定位
  11. SQL学习-数据库基础知识(1)
  12. C语言中钩子函数使用讲解
  13. 8大成功的网络营销案例 互联网营销案例分析
  14. 使用CSS3实现按钮特效
  15. java合成图片并添加文字
  16. 【爬虫入门】一键爬取LOL全部高清皮肤
  17. MIT6_0002F16_ProblemSet4
  18. .NET Framework各个版本(1.0 - 2.0)
  19. 解散等内容的飞鸽传书
  20. linux 7 开启远程桌面,配置CentOS 7允许来自Windows的远程桌面访问

热门文章

  1. 显示电池电量的小工具
  2. [原创]Pubwin2007服务器安全测试工具(防范Pubwin收银伴侣之类的软件)
  3. SSE,MSE,RMSE,R-square指标讲解
  4. 《Create Your Successful Agile Project》书评与作者访谈
  5. Numpy:数组合矢量计算
  6. First Night
  7. 数据结构--二叉树(1)
  8. [Hadoop] Hadoop学习历程 [持续更新中…]
  9. [转载]AIX 上 Lotus Domino 的内存使用
  10. 云上建站快速入门:博客、论坛、CMS、电子商务网站统统搞定