随笔分类 -  基础加强

摘要:方法一: public static string GetString(string str, int length) { int i = 0, j = 0; foreach(char chr in str) { if((int)chr > 127) { i += 2; } else { i ++; } if (i > length) { str = str.Substring(0, j) +... 阅读全文
posted @ 2016-07-14 14:35 刘小轩 阅读(514) 评论(0) 推荐(0)
摘要: 阅读全文
posted @ 2016-07-14 10:30 刘小轩 阅读(204) 评论(0) 推荐(0)
摘要:在WEB数据传输过程中,json是以文本,即字符串的轻量级形式传递的,而客户端一般用JS操作的是接收到的JSON对象,所以,JSON对象和JSON字符串之间的相互转换、JSON数据的解析是关键。先明确2个概念例如:JSON字符串:var str1 = '{ "name": "deyuyi", "se... 阅读全文
posted @ 2016-01-03 15:51 刘小轩 阅读(254) 评论(0) 推荐(0)
摘要:说在前面文章转自 http://www.cxyclub.cn/n/49493/在MVC控件器传递多个Model到视图,使用ViewData,ViewBag,部分视图,TempData,ViewModel,Tuple"中,体验了使用不同的方式传递多个Model,而ViewData、ViewBag、Pa... 阅读全文
posted @ 2015-10-21 15:00 刘小轩 阅读(383) 评论(0) 推荐(0)