易截截图软件、单文件、免安装、纯绿色、仅160KB

asp.net 导出Excel/Word

asp.net中导出有很多方法。其中比较推荐的兼容导出是导出为word/excel兼容的mhtml格式并设置流格式为word或excel。
这中方法的好处是可以建立一个通用的库。本文中提出了一个通用的导出类,实践中使用效果较好。(ps,html解析类写的比较仓促,各位如有兴趣可重写一下~)
///
///@Author Simsure
///@Version 1.0
///
using System;
using System.Collections;
using System.Collections.Generic;
using System.Text;
using System.Text.RegularExpressions;
using System.Web;
using System.Net;
using System.IO;
/// <summary>
///MHtmlDocument 的摘要说明
/// </summary>
public class MHtmlDocument
{
    protected const string _NEXT_PART = "------=_NextPart_WIND";
    protected const string _4NEXT_PART = "----=_NextPart_WIND";
    private const string WIND_SESSION_ID = "wind.sessionid";
    protected string _encoding = "utf-8";
    protected string _pageVirutalPath;
    protected string _rootHttpVirtualPath;
    protected bool _enableBase64 = false;
    protected HtmlDocument _baseDocument;
    protected HttpRequest _request;
    protected HttpResponse _response;
    protected static readonly log4net.ILog _log = log4net.LogManager.GetLogger("MHtmlDocument");
    public string Encoding
    {
        get { return _encoding; }
    }
    public string RootHttpVirtualPath
    {
        get { return _rootHttpVirtualPath; }
    }
    public string PageVirtualPath
    {
        get { return _pageVirutalPath; }
    }
    public bool EnableBase64
    {
        get { return _enableBase64; }
        set { _enableBase6


相关文档:

Asp.Net构架(Http请求处理流程) Part.1

URL:
http://www.cnblogs.com/JimmyZhang/archive/2007/09/04/880967.html
引言
我查阅过不少Asp.Net的书籍,发现大多数作者都是站在一个比较高的层次上讲解Asp.Net。他们耐心、细致地告诉你如何一步步拖放控件、设置控件属性、编写CodeBehind代码,以实现某个特定的功能。
这种做法,实际上是回答了“如何去做&rd ......

Asp.net 123

(1)asp.net 实现n秒后页面自动跳转
1.
<script type="text/javascript" language="javascript">
function reloadyemian()
{
    window.location.href = "javascript:history.go(-1)";      
}
window.setTimeout("reloadyemian();",5000);
</script> ......

asp.net中"错误:回发或回调参数无效"

错误信息:
回发或回调参数无效。在配置中使用 <pages enableEventValidation="true"/> 或在页面中使用 <%@ Page EnableEventValidation="true" %> 启用了事件验证。出于安全目的,此功能验证回发或回调事件的参数是否来源于最初呈现这些事件的服务器控件。如果数据有效并且是预期的,则使用 ClientScriptMan ......

asp.net 图片 画线

Bitmap srcImg = new Bitmap(300, 300); //也可以读入一张图片
Graphics graphics = Graphics.fromImage(srcImg);
Font font = new Font("宋体", 16); //字体与大小
Brush brush = new SolidBrush(Color.Red);
graphics.DrawString("www.cftea.com", font, brush, 50, 50); //写字,最后两个参数表示位置
Pen pen = ne ......

asp.net 生成验证码两个例子

#region 1
private void CreateCheckCodeImage()
{
//获取随即字符串
int number;
char code;
string checkCode = String.Empty;
System.Random random1 = new Random();
for (int i = 0; i < 5; i++)
{
number = random1.Next( ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号