
.net
MY-备忘
这个作者很懒,什么都没留下…
展开
专栏收录文章
- 默认排序
- 最新发布
- 最早发布
- 最多阅读
- 最少阅读
-
iTextSharp-PDF批量导出
HTML转PDF批量导出速度太慢且使用Spire.pdf.dll限制页签10后需要开通会员才能使用-做出优化。原创 2025-03-11 11:17:15 · 431 阅读 · 0 评论 -
阿拉伯数字转中文数字
public class IntToSmallChineseNumber { public static String ToCH(int intInput) { string si = intInput.ToString(); string sd = ""; if (si.Length == 1) // 個 { sd += GetCH(in.原创 2020-07-01 17:24:38 · 238 阅读 · 0 评论 -
.net去除html代码
1.亲测可以用-去除富文本复制文字或图片带有的html导致数据显示不出来 public static string NoHTML(string Htmlstring) { Htmlstring = Regex.Replace(Htmlstring, @"<script[^>]*?>.*?</script>", "",...原创 2019-01-29 09:13:39 · 392 阅读 · 0 评论 -
net::ERR_ABORTED
net::ERR_ABORTED 网页端找不到资源导致这个问题。我感觉很奇怪,我路径并没出错,但依旧找不到。 后来,我把所有的资源,css,js,图片等都转移到同一个目录下,就能找到。...原创 2019-01-29 09:16:58 · 15415 阅读 · 0 评论 -
.net服务器控件不进后台原因
:要设置AutoPostBack="True"原创 2019-03-04 14:27:13 · 285 阅读 · 0 评论 -
生成小程序个人二维码
1.要有appid和密钥2.获取token public string get_token() { string wx_url = "https://api.weixin.qq.com/cgi-bin/token?grant_type=client_credential&appid=wxf050f84e644a8077&...原创 2019-03-22 11:45:03 · 1547 阅读 · 0 评论 -
asp.net 每天的某时刻定时执行任务
1、在Global.asax文件中 的Application_Start 中定义一个线程void Application_Start(object sender, EventArgs e) { // 在应用程序启动时运行的代码//定义一个线程 System.Threading.Thread LoadServiceData = new System....转载 2019-04-18 11:35:18 · 4417 阅读 · 0 评论 -
根据字段去除dt重复列
/// <summary> /// 按照fieldName从sourceTable中选择出不重复的行, /// 并且返回sourceTable中所有的列。 /// </summary> /// 2015-07-27 gaobin /// <param name...原创 2019-06-28 15:58:30 · 383 阅读 · 0 评论 -
PadLeft和PadRight的区别
在C#中可以对字符串使用PadLeft和PadRight进行轻松地补位。PadLeft(inttotalWidth,charpaddingChar)//在字符串左边用paddingChar补足totalWidth长度PadRight(inttotalWidth,charpaddingChar)//在字符串右边用paddingChar补足totalWid...原创 2019-08-13 09:48:18 · 400 阅读 · 0 评论 -
QQ自动登录
1.首先要有个访问页面触发回调地址using Newtonsoft.Json;using System;using System.Collections.Generic;using System.IO;using System.Linq;using System.Net;using System.Web;using System.Web.UI;using System.Web...原创 2019-01-27 12:02:12 · 1196 阅读 · 0 评论 -
C# 生成编码
#region ===================================生成编码================================= private string getuser_number() { //套餐订单 string str = "HY" + DateTime.Now...原创 2019-01-27 11:23:34 · 678 阅读 · 0 评论 -
执行DataTable中的查询返回新的DataTable
/// </summary> /// <param name="dt">源数据DataTable</param> /// <param name="condition">查询条件</param> /// <returns></原创 2018-09-18 17:46:34 · 4042 阅读 · 0 评论 -
在webservice找不到web方法
1web.config配置 <webServices> <protocols> <add name= "HttpGet" /> <add name= "HttpPost" /> <add name= "Unknown" /> &am原创 2018-10-11 08:51:26 · 3008 阅读 · 0 评论 -
数据列表一列截取前十位加...鼠标放上显示全部
<div class="table-container"> <asp:Repeater ID="rptList" runat="server"> <HeaderTemplate> <table width="100%"原创 2018-09-27 08:50:07 · 217 阅读 · 0 评论 -
使用JSON JavaScriptSerializer 进行序列化或反序列化时出错。字符串的长度超过了为 maxJsonLength属性
“/”应用程序中的服务器错误。使用 JSON JavaScriptSerializer 进行序列化或反序列化时出错。字符串的长度超过了为 maxJsonLength 属性设置的值。说明: 执行当前 Web 请求期间,出现未经处理的异常。请检查堆栈跟踪信息,以了解有关该错误以及代码中导致错误的出处的详细信息。异常详细信息: System.InvalidOperationException...转载 2018-09-27 08:58:01 · 1160 阅读 · 0 评论 -
CheckBoxList的使用
1. 设置一个标签可多选 DataSet set4 = Data.ExecuteDataSet("SELECT id,title,remark FROM Y_Label order by id desc"); this.CheckBoxList1.Items.Clear(); int num6 = ...原创 2018-10-31 15:03:53 · 274 阅读 · 0 评论 -
C# 生成二维码
1.从网上下载ThoughtWorks.QRCode.dll2 引用dll文件using System;using System.Collections.Generic;using System.Linq;using System.Text;using System.Drawing;using ThoughtWorks.QRCode.Codec;using ThoughtWo...原创 2018-11-01 14:11:52 · 300 阅读 · 0 评论 -
jQuery Ajax 方法调用 Asp.Net WebService 的详细例子
https://www.cnblogs.com/tianguook/archive/2010/12/04/1896492.html转载 2019-01-29 09:17:23 · 156 阅读 · 0 评论 -
将接口返回的josn字符串转为对象取数据
1.代码如下 string url = model.yuming + "/api/Loginlog" + '?' + "starttime=" + sxtime + "&endtime=" + gqtime + "&md5=" + md5 + ""; string json = httpGetStr(url);原创 2019-01-07 11:13:40 · 2261 阅读 · 0 评论 -
每年工作日与非工作日的设置
public string GetYear(int year){ if (year == 0){year = DateTime.Now.Year; //获取当前年份}DataTable dt = SQLHelper.GetDBToDataTable("select convert(varchar(10),NoWorkDate,120) as NoWo...原创 2018-06-08 09:46:33 · 1840 阅读 · 0 评论