易截截图软件、单文件、免安装、纯绿色、仅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(C#)实现SQL2000数据库备份和还原

asp.net(C#)实现SQL2000数据库备份和还原
using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.Htm ......

遭遇Asp.Net长文件名下载的问题和解决办法

在Asp.Net中写了一个附件上传和下载的程序,附件上传到数据库中,然后将附件的GUID保存起来,我们可以根据GUID来找到数据库中的附件,一般附件下载的代码是:
private void Download(string ID)
    {
        file = logic.GetA ......

ASP.NET 中如何对生成的 HTML 内容流进行控制?

<%@ Page Language="C#" %>  
<%@ Import Namespace="System.IO" %>  
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">  
<script runat="server">  
  prote ......

asp.net 图片处理 获取图片宽度和高度

1.获取图片宽度和高度
    1.您可以使用 System.Drawing.Image 类
    System.Drawing.Image img = System.Drawing.Image.fromFile(Server.MapPath("example.gif"));
int width = img.Width;
int height = img.Height;
img.Dispose();
但是这里我们却不能在导入名称空间后使用 Image& ......

asp.net中关于&,双引号和单引号的用法

 关于&、双引号、和单引号的解释
 
下面先简单地说一下他们的意义。
      (1)&是连接运算符,它可以将两个字符串连接成一个字符串。如 
         a="abc" & "def" 
 执行连接运算后,a="abcdef ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号