易截截图软件、单文件、免安装、纯绿色、仅160KB

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# 读写XML文件

   用c#给PDA做了一个PC端的通讯程序,需要保存两个参数。用Delphi时,是保存在ini文件中,c#读写XML比较方便,就用xml文件来保存了。
   
 
class CXmlClass
{
private string XmlFilePath;
/// <summary>
/// 下载到PDA的TXT文件路径 
/// </summary>
......

asp.net 4种事务


<!--
/* 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 ......

C#操作各种执行sql的方法含存储过程操作

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(
@ ......

c#启动Sql Server服务

程序启动Sql Server其实很简单
代码:
System.ServiceProcess.ServiceController   myController   =
new   System.ServiceProcess.ServiceController("MSSQL$ACCP4444"); //服务名称 找了半天才找到,笨死我完了。在服务上右键属性,能看到
if (myController.CanStop)
{ }
else ......

C#和JavaScript的简单互交

1.asp.net呼叫js
   
                     Response.Write("<script language=javascript>");
              &n ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号