随笔分类 - asp.net
摘要:using System; using System.Runtime.Remoting.Messaging; using System.Threading; using System.Threading.Tasks; namespace LCS.WeiXin.Transfer { class Program { public delegate int AddHa...
阅读全文
摘要:1 using System; 2 using System.Collections.Generic; 3 using System.Linq; 4 using System.Web; 5 using MongoDB.Driver; 6 using MongoDB.Bson; 7 using MongoDB.Driver.Builders; 8 9 name...
阅读全文
摘要:一、Windows服务安装: framework 4.0 : cd C:\Windows\Microsoft.NET\Framework\v4.0.30319 framework 2.0 : cd C:\Windows\Microsoft.NET\Framework\v2.0.50727安装服务 :
阅读全文
摘要:引用别人的: static void Main(string[] args) { List l = new List(); l.Add("a"); l.Add("b"); l.Add("s"); ...
阅读全文
摘要:1、根据图片路径返回字节public static byte[] getImageByte(string imagePath){ FileStream files = new FileStream(imagePath, FileMode.Open); byte[] imgByte = n...
阅读全文
摘要:序列化成一个字符串:public static string XMLSerialize(T entity) { StringBuilder buffer = new StringBuilder(); XmlSe...
阅读全文
摘要:1、Post提交 private string PostWebRequest(string Url, string paramData, string dataEncode) { string ret = string.Empty; try ...
阅读全文
摘要:制作一个aspx页面,专门用来生成各个动态aspx页面的静态页面。如下图所示,仅将内容页和主页面生成静态页面,当然本例只是一个简单的范例,实际情况如很复杂,但原理都是相同的。生成内容页:本例中的不同内容页以不同的ID来进行区分,输入不同的ID值,点击“生成内容页”按钮,将调用执行后台代码(如代码)...
阅读全文
摘要:首先下载facebook相关的动态库,下载文件:facebook.dll获取授权token方法: private string SetToken(string gettoken)//此处是你的短token,通过token获取一个两个月的长token { stri...
阅读全文
摘要:1 public sealed class StringTool 2 { 3 /// 4 /// 将txt文件读入字符串 5 /// 6 /// 7 /// 8 pu...
阅读全文
摘要:方法一: byte[] byte1 = FileUpload1.FileBytes; byte[] byte2 = FileUpload2.FileBytes; byte[] a1 = Encoding.UTF8.GetBytes("["); ...
阅读全文
摘要:static void Main(string[] args) { book book = new book();//实体类 booktest b1 = new booktest(); book....
阅读全文
摘要:先写一个xml文件: 1 2 3 4 5 编译原理 6 佚名 7 30.00 8 9 10 11 计算机操作系统12 test13 28.0014 15 View Code1.使用XmlDocument 使用XmlDoc...
阅读全文
摘要:public class Utility:Page { #region 数据转换 /// /// 返回对象obj的String值,obj为null时返回空值。 /// /// 对象。 /// 字符串。 ...
阅读全文
摘要:前台用DataList绑定 '> " target="_blank" title="点击放大看"> ' /> ...
阅读全文
摘要:(1).使用StreamReader读取文件,然后一行一行的输出。 public void Read(string path) { StreamReader sr = new StreamReader(path,Encoding.Default); ...
阅读全文
摘要:/// /// DataSet实例 /// DataList名称 /// 分页大小 public static string GetPageNum(DataSet ds, DataList datalistname, int ...
阅读全文
摘要:using System.Net.Mail; /// 发送邮件 /// /// /// protected void ForMail(string name, string mail) { ...
阅读全文
浙公网安备 33010602011771号