asp.net c#数据库还原
public partial class shujuku_huanyuan : System.Web.UI.Page
{
SqlConnection conn = new SqlConnection(@"server=HUAZD-33\XXD33;uid=sa;pwd=111111;database=master;");
protected void Page_Load(object sender, EventArgs e)
{
if (!Page.IsPostBack)
{
SqlConnection sqlConn = SqlConnections.GetSQLConnection();
string shujuku = sqlConn.Database;
this.Text1.Value = shujuku;//备份数据库路径
}
}
protected void btnsearch_ServerClick(object sender, EventArgs e)
{
ArrayList arraylistsqls = new ArrayList();
string path1 = Request["FileUpload1"].ToString().Trim(); //this.FileUpload1.FileName.ToString().Trim();
string shujukuming = this.Text1.Value.ToString().Trim();
if (System.IO.File.Exists(path1))
{
}
else
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('该路径下的备份文件不存在,请重新选择!');</script>");
return;
}
相关文档:
静态变量
当我们编写一个类时,其实就是在描述其对象的属性和行为,而并没有产生实质上的对象,只有通过new关键字才会产生出对象,这时系统才会分配内存空间给对象,其方法才可以供外部调用。
有时候,我们希望无论是否产生了对象或无论 ......
在数据库编程中,常会遇到要把数据库表信息导入Excel中, 有时则是把Excel内容导入数据库中。在这里,将介绍一种比较方便快捷的方式,也是比较普遍的。其实,这方法你并不陌生。原理很简单,把数据库表或Excel内容读取到dataset类型的变量中,再逐 ......
1.将flex编译后的程序插入到asp.net页面
flex的最终输出就是一张网页+一个flash(.swf文件)
这么说你明白了吧,其实就是用他生成的网页的方式把那个.swf文件插入到你的asp.net页面就可以了。
假如你的flex3项目名字叫TestApp,最简单直接的办法就是,
把"bin-debug"目录下的:
TestApp.html
TestApp.swf
AC_OETags.js ......
已知有一个XML文件(bookstore.xml)如下:
<?xml version="1.0" encoding="gb2312"?>
<bookstore>
<book genre="fantasy" ISBN="2-3631-4">
<title>Oberon's Legacy</title>
<author>Corets, Eva</author>
<price>5.95</price> ......
protected void btnsearch_ServerClick(object sender, EventArgs e)
{
string lujing=this.Text2.Value.ToString().Trim();
string shujuku = this.jine.Value;
&nbs ......