易截截图软件、单文件、免安装、纯绿色、仅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中如何遍历HashTable

asp.net遍历HashTable需要用到DictionaryEntry Object,asp.net遍历HashTable,可以通过如下两种方法来实现,
方法一:
foreach (System.Collections.DictionaryEntry objDE in objHasTab)
{
    Console.WriteLine(objDE.Key.ToString());
    Console.WriteLine(objDE.Value.ToString ......

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

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

ASP.NET网站开发小结

1.<script src="Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
Vs2005红色了,提示找不到该文件
于是改为.<script src="/Scripts/AC_RunActiveContent.js" type="text/javascript"></script>
结果红色没有了,但是编译时报错,找不到该文件
结论:<script src="Script ......

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号