所有类别

  • 几种用c# 拼接Json串的方法

    C#定义多行字符串的方式在定义的前面加上@符号: string aa = @"asdfsdfsdfsdsfsdfsdfsdfsdfsdfssafasfsadfsdfasfsfsdfsd "; 在C#中拼接字符串有几种方法1. 利用 JsonConvert.SerializeObject方法 (Nuget获取Newtonsoft.Json Package)string uid = "22&a…

    2019-09-11 373

  • 一般处理程序返回Json

    1、需要引用using System.Web.Script.Serialization;2、采用方法如下:List<Student> lists = new List<Student> { new Student{ Name ="小李", Gender ="男"}, new Student{ Name ="小王", Gender="男"}…

    2019-08-16 242

  • ExecuteScalar 返回值问题

    DbCommand.ExecuteScalar 方法:执行查询,并返回查询所返回的结果集中第一行的第一列。 所有其他的列和行将被忽略。语法: public abstract Object ExecuteScalar() 返回值: 类型: System.Object,结果集中第一行的第一列。备注: 使用 ExecuteScalar 方法从数据库中检索单…

    2019-08-16 273

  • C#中 json转model 以及model转json

    1.json转modelTestModel tm = new TestModel();JavaScriptSerializer js = new JavaScriptSerializer();tm = js.Deserialize<TestModel>(JsonString);2.model转json方式1: string Json = JsonConvert.SerializeObject(tm);方式2:会将时间转换为 时间戳格式JavaSc…

    2019-08-16 357

  • 行业网中nofollow标签大多使用

    nofollow是一个html标签的属性值,用于告诉搜索引擎不要追踪带有nofollow属性的链接。 比如某行业站收录42000 pr5 百度权重5 首页内链总数 268 使用nofollow链接个数40 使用率40/268*100%=14%。行业网对于nofollow的使用的普及率差不多接近100%。而在大型行业网中nofoll…

    2019-05-14 433