asp.net c# 数据库备份
protected void btnsearch_ServerClick(object sender, EventArgs e)
{
string lujing=this.Text2.Value.ToString().Trim();
string shujuku = this.jine.Value;
string wenjianming = this.Text1.Value.ToString().Trim();
if (wenjianming.IndexOf(".bak") == -1)
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('备份文件名格式错误!');</script>");
return;
}
if (System.IO.File.Exists(lujing))
{
//则表示存在
}
else
{
//创建该文件夹
System.IO.Directory.CreateDirectory(lujing);
}
string wenjj = lujing + @"\" + wenjianming;
if (System.IO.File.Exists(wenjj))
{
Page.ClientScript.RegisterStartupScript(Page.GetType(), "", "<script>alert('备份文件名已存在,请重新命名!');</script>");
return;
}
string cmd1 = "backu
相关文档:
Request.ServerVariables["Url"]
返回服务器地址
Request.ServerVariables["Path_Info"]
客户端提供的路径信息
Request.ServerVariables["Appl_Physical_Path"]
与应用程序元数据库路径相应的物理路径
Request.ServerVariables["Path_Translated"]
通过由虚拟至物理的映射后得到的路径
Request.ServerVariables ......
有很久一段时间我的BLOG上没有出现AJAX相关讯息了,主要当然是因为绝大部分的重心都放到了Silverlight身上(可预期的未来应该也会是如此)。
但由于工作上的需要,最近还是回头看了一下即将推出的ASP.NET Ajax Library...,顺便找了一下网络上的讯息,看这个态势我猜想应该不少ASP.NET开发人员忽略掉了这个其实已经bet ......
using System;
using System.Collections.Generic;
using System.Text;
using System.Data.SqlClient;
using System.Xml;
using System.Data;
namespace MyDbTest
{
class Program
{
static void Main(string[] args)
{
SqlConnection thisConnection = new SqlConnection(
@ ......
在root账号中,可以正常调用存储过程.
换到common_user账号时,同一存储过程名调用出现问题.
追踪调试时出现:
SELECT command denied to user 'common_user'@'localhost' for table 'proc'
搜索解决方案:
MySqlConnection myconnection = new MySqlConnection("server=localhost;user id=common_user; password=***;dat ......
1.将flex编译后的程序插入到asp.net页面
flex的最终输出就是一张网页+一个flash(.swf文件)
这么说你明白了吧,其实就是用他生成的网页的方式把那个.swf文件插入到你的asp.net页面就可以了。
假如你的flex3项目名字叫TestApp,最简单直接的办法就是,
把"bin-debug"目录下的:
TestApp.html
TestApp.swf
AC_OETags.js ......