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时候,当请求一个*.asp页面文件的时候,这个HTTP请求首先会被一个名为inetinfo.exe进程所截获,这个进程实际上就是www服务。截获之后它会将这个请求转交给asp.dll进程,这个进程就会解释这个asp页面,然后将解释后的数据流返回给客户端浏览器。其实ASP.DLL是一个依附在IIS的ISAPI文件,它负责了对诸如ASP文件,A ......
asp.net 对xml文件的读写,添加,修改,删除操作
下面有代码调试正确
using System;
using System.Collections;
using System.ComponentModel;
using System.Data;
using System.Drawing;
using System.Web;
using System.Web.SessionState;
using System.Web.UI;
using&nb ......
最近正在学习 ASP.NET(C#) ,感觉认识上去了就不是那么难以理解了。我是ASP 出身,有的时候学ASP.NET 总是混淆的一些地方。呵呵,不过理解上去了就好很多了。我希望好朋友们提提好的建议。帮帮小弟!!!!!!!!!!1 ......
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 ......