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;
}
相关文档:
用c#给PDA做了一个PC端的通讯程序,需要保存两个参数。用Delphi时,是保存在ini文件中,c#读写XML比较方便,就用xml文件来保存了。
class CXmlClass
{
private string XmlFilePath;
/// <summary>
/// 下载到PDA的TXT文件路径
/// </summary>
......
最近开始了ASP.NET AJAX的全面学习。在服务端编程这块主要有几个服务器控件负责,他们分别为:ScriptManager,Timer,UpdatePanel,UpdateProgress.
先来说说ScriptManager.它有个方法registerAsyncPostBackControl(控件),可以注册页面上的任何控件为异步传送按钮。还有个方法叫 ......
<!--
/* Font Definitions */
@font-face
{font-family:宋体;
panose-1:2 1 6 0 3 1 1 1 1 1;
mso-font-alt:SimSun;
mso-font-charset:134;
mso-generic-font-family:auto;
mso-font-pitch:variable;
mso-font-signature:3 135135232 16 0 262145 0;}
@font-face
{font-family:"Cambria Mat ......
Delphi7 调用 C#的Webservice 不能传入参数
解决办法:
在Delphi导入WSDL后生成的单元的最后一行,即initialization里的初始化端口的代码中加入代码
InvRegistry.RegisterInvokeOptions(TypeInfo(接口名), ioDocument);
即可
......
protected void btnsearch_ServerClick(object sender, EventArgs e)
{
string lujing=this.Text2.Value.ToString().Trim();
string shujuku = this.jine.Value;
&nbs ......