【C#】导入 / 导出 / 转换 / 生成
idays021
这个作者很懒,什么都没留下…
展开
-
利用Excel生成Html页面
利用Excel生成Html页面using System;using System.Collections.Generic;using System.Linq;using System.Web;using System.Reflection;//需要添加的命名空间//using Microsoft.Office.Interop;/// ///Class1 利用Excel生成ht翻译 2012-06-27 15:41:08 · 1462 阅读 · 0 评论 -
MVC3导出Word文档
利用aspose在线导出word文档翻译 2014-08-24 19:24:03 · 2521 阅读 · 0 评论 -
对字符串进行编码解码
对字符串进行Base64编码解码using System;using System.Collections.Generic;using System.Linq;using System.Text;namespace Common{ public class Base64Code { Dictionary _SmokeDict; pu翻译 2012-12-22 14:13:16 · 679 阅读 · 0 评论 -
将数字转换成大写
public class NumberToUpper { //大小写转换函数 public string ConvertSum(string str) { if (!IsPositveDecimal(str)) return "实收总额未输入或输入不规范!";翻译 2012-10-11 13:57:36 · 367 阅读 · 0 评论 -
将Image转换成byte[]数组
/// /// 将Image转换成byte[]数组 /// /// /// public byte[] ConvertImageToByte(Image img) { System.IO.MemoryStream ms = new System.IO.MemoryStre翻译 2012-10-26 13:31:05 · 1006 阅读 · 0 评论 -
ASP.NET 给图片动态添加文字水印
文件结构图:Default.aspx 这里只是添加了几个图片 下面这张图片不存在显示程序指定的默认图片 WaterMarkHandler.cs using System;using System.Web;using System.Drawing;using System.Draw翻译 2012-06-28 22:06:27 · 419 阅读 · 0 评论 -
substring完美截取HTML字符
public string GetContentSummary(string content, int length, bool StripHTML) { if (string.IsNullOrEmpty(content) || length == 0) return ""; if (StripHTML翻译 2012-06-28 22:16:55 · 1042 阅读 · 0 评论 -
生成随即验证码图片
主要步骤为:随机生成字符串,并将字符串保存到Session或者Cookie中将生成字符串绘 制成图片,并设置元素的src为动态生成的图片 //即生成随机验证码图片的页面 生成随机验证码图片代码://可放置在生成验证码图片的页面并执行,即元素的src指向的页面CheckImage.aspx.cs页面 //前台页面没做任何处理using System;using翻译 2012-06-27 22:31:51 · 337 阅读 · 0 评论 -
C# 生成随即验证码图片类库
using System;using System.Web;using System.Collections.Generic;using System.Text;using System.Drawing.Imaging;using System.Drawing;public class ValidateCode{ private int _Length; priv翻译 2012-06-27 22:30:31 · 86360 阅读 · 0 评论