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

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.Net 文件上传大小限制解决方案修改IIS7/7.5配置

IIS 7 默认文件上传大小时30M
要突破这个限制:
1. 修改IIS的applicationhost.config
    打开 %windir%\system32\inetsrv\config\applicationhost.config
     找到: <requestFiltering>节点,
  这个节点默认没有 <requestLimits maxAllowedContentLength="上传 ......

Asp.Net XML操作基类

using System;
using System.Data;
using System.Configuration;
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.IO;
using System.Xml;
using System.Text; ......

asp.net treeview 菜单树 链接 展开 折叠

画面:
<asp:HiddenField ID="hfdXuHao" runat="server" />
<asp:TreeView ID="tvMenu" runat="server" CssClass="tvStyle" EnableClientScript="false"
                        & ......

asp.net 邮件发送

//实例化一个SmtpClientsmtp.DeliveryMethod = SmtpDeliveryMethod.Network;
SmtpClient smtp = new SmtpClient();
smtp.DeliveryMethod = SmtpDeliveryMethod.Network;

//将smtp的出站方式设为 Networksmtp.EnableSsl = false;
//smtp服务器是否启用SSL加密
smtp ......

ASP.Net 2.0窗体身份验证机制

本篇文章介绍了在ASP.Net 2.0如何做窗体身份验证,并且讲解了IIS和ASP.Net2.0窗体身份验证机制是如何结合在一起的。我们还会详细讲解一下2.0中关于窗体身份验证的一个类:FormsAuthenticationModule。
l         综述
当某一个用户使用用户名成功登陆网站时,FormsAuthenticatio ......
© 2009 ej38.com All Rights Reserved. 关于E健网联系我们 | 站点地图 | 赣ICP备09004571号