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

asp.net(C#) 数据库备份还原 源码

Backup.aspx
  protected void Button1_Click(object sender, EventArgs e)
    {
        string path = Server.MapPath("") + @"\Backup";
        if (!Directory.Exists(path))
        {          
            Directory.CreateDirectory(path);
        }
        try
        {
            path = Convert.ToString(Hst.DBUtility.DbHelperSQL.GetSingle("p_DataBaseBack"));
            LabelMessage.Text = "备份成功; 文件存放路径在:" + path;
        }
        catch
        {
            LabelMessage.Text = "备份失败!请联系管理员";
        }
       
    }
DataBack.aspx
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.HtmlControls;
using System.Data.SqlClient;
using Hst.DBUtility;
public partial class SysManager_DataBack : System.Web.UI.Page
{
    const string FilePath = "E:\\Backup\\";
    int a = 1;
    Hst.SysManage.FileControl fc = new Hst.SysManage.FileControl();
    protected void Page_Load(object sender, EventArgs e)
    {
        if (!IsPostBack)
  


相关文档:

ASP.Net 文件上传大小限制解决方案修改IIS7/7.5配置

IIS 7 默认文件上传大小时30M
要突破这个限制:
1. 修改IIS的applicationhost.config
    打开 %windir%\system32\inetsrv\config\applicationhost.config
     找到: <requestFiltering>节点,
  这个节点默认没有 <requestLimits maxAllowedContentLength="上传 ......

ASP.NET常用的类

系统类
  Type类,Object类,String类, Array类,Console类, Exception类,GC类, MarshalByRefObject类, Math类。
  DateTime结构,Guid 结构,
  ICloneable接口,IComparable接口,IConvertible接口, IDisposable类,
  集合类
  ICollection接口,IComparer接口,IDictionary接口。IDictionaryEnume ......

ASP.Net 2.0窗体身份验证机制

本篇文章介绍了在ASP.Net 2.0如何做窗体身份验证,并且讲解了IIS和ASP.Net2.0窗体身份验证机制是如何结合在一起的。我们还会详细讲解一下2.0中关于窗体身份验证的一个类:FormsAuthenticationModule。
l         综述
当某一个用户使用用户名成功登陆网站时,FormsAuthenticatio ......

mysql数据Unix时间戳与C# DateTime时间类型互换

Unix时间戳最小单位是秒,开始时间为格林威治标准时间1970-01-01 00:00:00
ConvertIntDateTime方法的基本思路是通过获取本地时区表示Unixk开始时间,加上Unix时间值(即过去的秒数).
ConvertDateTimeInt方法的基本思路是通过刻度数差,再把刻度数转换为秒数,当然要说明的是,我这里返回的是double类型,意义上并非是真 ......

C#关键字:访问关键字(access keyword)

 C#中访问关键字(access keyword)有两个:base、this
 
1.base
   用于从派生类中访问基类的成员,包括:
     a.调用基类上已被其它方法重写(override)的方法。
     b.指定创建派生类实例时应调用的基类构造函数。
  注意:对基类的访问只能 ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号