master
editor 3 weeks ago
commit bcd1c4e68d

@ -0,0 +1,54 @@
51ASPXXML简单留言本
一、源码描述
环境VS2022 sql2019
二、功能介绍
一个XML做为数据库的留言本程序利用了Asp.net2.0中的DataList、MemberShip等控件
该程序采用面相对象开发
注意后台管理采用Sql2005数据库,现已升级至sql2019
删除留言的权限设置在web.config中注释掉了若想使用登录功能释放注释可以找到数据库连接字符的设置处
修改成本机的即可。
<location path="Manager">
<system.web>
<authorization>
<deny users="?" />
</authorization>
</system.web>
</location>
<authentication mode="Forms">
<forms loginUrl="manager/Login.aspx" protection="None"  path="/"></forms>
</authentication>
三、注意事项
1、在项目web.config修改数据库连接字符串附加数据库。
2、ctrl+F5运行即可。
作者: 51aspx
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/XmlLiuyanben
------------------------------------------------------------------------------------------------
源码服务专家
官网: https://www.51aspx.com
讨论圈: https://club.51aspx.com/
平台声明:
1.51Aspx平台上提供下载的资源为免费、共享、商业三类源码,其中免费和共享源码仅供个人学习和研究使用,商业源码请在相应的授权许可条件下使用;
2.51Aspx平台对提供下载的软件及其它资源不拥有任何权利,其版权归属源码合法拥有者所有;
3.著作权人发现本网站载有侵害其合法权益的内容或作品,请与我们联系( 登录官网与客服反馈或发送邮件到support@51Aspx.com
4.51Aspx平台不保证提供的下载资源的准确性、安全性和完整性;
友情提示:
一般数据库文件默认在 DB_51Aspx 文件夹下
默认账号密码一般均为51Aspx
关于源码使用常见问题及解决方案,请参阅: https://www.51aspx.com/Help

@ -0,0 +1,15 @@
using System;
using System.Data;
using System.Configuration;
using System.Web;
using System.Xml;
/// 该源码下载自www.51aspx.com()
/// <summary>
/// XML文件的读写类
/// </summary>
public class XMLRW
{
/// <summary>
/// 结构化函数
/// </summary>

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>51aspxXML简单留言本</title>
</head>
<body>
<form id="form1" runat="server">
<div>
&nbsp;<table style="width: 487px">
<tr>
<td>
<asp:HyperLink ID="HyperLink1" runat="server" NavigateUrl="~/SendMSG.aspx" Width="151px">发表留言</asp:HyperLink></td>

@ -0,0 +1,15 @@
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.Xml;
//该源码下载自www.51aspx.com()
public partial class _Default : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="DeleMsg.aspx.cs" Inherits="Manager_DeleMsg" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:GridView ID="GridView1" runat="server" DataSourceID="XmlDataSource1" AutoGenerateColumns="False" Width="490px" OnRowCommand="GridView1_RowCommand">
<Columns>
<asp:BoundField DataField="name" HeaderText="name" SortExpression="name" />
<asp:BoundField DataField="mail" HeaderText="mail" SortExpression="mail" />

@ -0,0 +1,15 @@
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;
public partial class Manager_DeleMsg : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Manager_Login" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>无标题页</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:Login ID="Login1" runat="server" Height="192px" Width="371px" DestinationPageUrl="~/Manager/DeleMsg.aspx">
</asp:Login>
</div>

@ -0,0 +1,15 @@
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;
//该源码下载自www.51aspx.com()
public partial class Manager_Login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="SendMSG.aspx.cs" Inherits="SendMSG" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
<title>留言</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<table style="width: 416px">
<tr>
<td colspan="2">
留言内容:</td>

@ -0,0 +1,15 @@
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;
public partial class SendMSG : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<?xml version="1.0" encoding="gb2312"?>
<message>
<msgrecord>
<name>51aspx</name>
<mail>support@51aspx.com</mail>
<url>http://www.51aspx.com</url>
<msg><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>һ<EFBFBD>£<EFBFBD></msg>
</msgrecord>
<msgrecord>
<name>51aspx</name>
<mail>support@51aspx.com</mail>
<url>http://www.51aspx.com</url>
<msg><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>Ա<EFBFBD><EFBFBD><EFBFBD>֧<EFBFBD><EFBFBD>һ<EFBFBD>£<EFBFBD></msg>
</msgrecord>
<msgrecord>
Loading…
Cancel
Save