2021年1月29日

下载文件

摘要: //添加地址 HttpWebRequest requestUrl = (HttpWebRequest)WebRequest.Create(url); requestUrl.Method = "GET"; requestUrl.Accept = "text/html,application/xhtml 阅读全文

posted @ 2021-01-29 11:27 透明的鱼! 阅读(163) 评论(0) 推荐(0) 编辑

下载文件所对应的的 Content-type类型

摘要: 图片: Content.Headers.ContentType = new MediaTypeHeaderValue("image/png"); 视频: Content.Headers.ContentType = new MediaTypeHeaderValue("video/mp4") .docx 阅读全文

posted @ 2021-01-29 11:26 透明的鱼! 阅读(4317) 评论(0) 推荐(1) 编辑

2021年1月20日

c# 小程序微信支付

摘要: 微信支付步骤: 1.小程序后台下单 生成订单号 //获取商品价格 decimal shop_money = Convert.ToDecimal(shop_info.Rows[0]["money"]); //获取商品名称 string title = shop_info.Rows[0]["title" 阅读全文

posted @ 2021-01-20 17:56 透明的鱼! 阅读(1282) 评论(0) 推荐(0) 编辑

.net payload 取值

摘要: StreamReader sr = new StreamReader(HttpContext.Current.Request.InputStream); string responseStr = sr.ReadToEnd(); 阅读全文

posted @ 2021-01-20 13:46 透明的鱼! 阅读(171) 评论(0) 推荐(0) 编辑

2021年1月8日

C# 添加接口筛选器

摘要: 1.创建一个mvc 2.在App_Start文件夹中 找到WebApiConfig文件,没有就手动添加一个 3.在Global.asax文件中注册一下 public class MvcApplication : System.Web.HttpApplication { protected void 阅读全文

posted @ 2021-01-08 18:04 透明的鱼! 阅读(294) 评论(0) 推荐(1) 编辑

C# 前台授权后 后台获取手机号信息

摘要: 1.页面需要用到绑定的方法getPhoneNumber获取iv和encryptedData, getPhoneNumber (e) { console.log(e.detail.iv) //加密算法的初始向量 console.log(e.detail.encryptedData) //包括敏感数据在 阅读全文

posted @ 2021-01-08 10:35 透明的鱼! 阅读(689) 评论(0) 推荐(0) 编辑

2021年1月7日

.net c# 微信授权 获取用户信息

摘要: /// <summary> ///接口获取openid和session_key /// </summary> /// <param name="code">前台通过调用login接口获取到的code</param> /// <param name="anonymous_code">前台通过调用log 阅读全文

posted @ 2021-01-07 14:42 透明的鱼! 阅读(804) 评论(0) 推荐(0) 编辑

2021年1月5日

c# 读取text文件

摘要: 直接读取text文件 话不多说 直接上代码演示 // 读操作 public string Read() { int a=0; int tiaoshu = 20; string strReadLine = ""; // 读取文件的源路径及其读取流 string strReadFilePath = @" 阅读全文

posted @ 2021-01-05 10:40 透明的鱼! 阅读(1206) 评论(0) 推荐(0) 编辑

c# 生成text 数据

摘要: public string Test() { DataTable dt = hotWorksComment.get_info();//查询数据库信息 if (dt.Rows.Count > 0) { string json = DataTableToJson(dt); //查询出来的datatabl 阅读全文

posted @ 2021-01-05 10:36 透明的鱼! 阅读(233) 评论(0) 推荐(0) 编辑

2020年11月27日

sql sever 字段种类

摘要: bit 整型 bit数据类型是整型,其值只能是0、1或空值。这种数据类型用于存储只有两种可能值的数据,如Yes 或No、True 或False 、On 或Off. 注意:很省空间的一种数据类型,如果能够满足需求应该尽量多用。 tinyint 整型 tinyint 数据类型能存储从0到255 之间的整 阅读全文

posted @ 2020-11-27 14:19 透明的鱼! 阅读(160) 评论(0) 推荐(0) 编辑

导航