master
editor 5 days ago
commit 9a598a693b

@ -0,0 +1,43 @@
51ASPX简单入门新闻系统(ASP.NET2.0+ACCESS)
一、源码描述
环境VS2022 Access
二、功能介绍
一个采用Asp.net2.0+AccessVS2022也可用开发的简单新闻发布系统适合新手操练用
后台有新闻的管理功能,新闻的编辑采用了网页编辑器
/news.aspx为新闻首页
/admin_m/login.aspx为后台管理登陆页默认登陆帐号密码为51aspx
51aspx特别提示该系统采用了地址随机加密如果不需要该功能请在web.config中设置cookieless="false"
三、注意事项
1、在项目App_Code\access.cs修改数据库连接字符串。
2、管理员账号与密码51aspx 51aspx 。
3、ctrl+F5运行即可。
作者: 随风
如需获得该源码的视频、更新等更多资料请访问: https://www.51aspx.com/Code/SimpleNews
------------------------------------------------------------------------------------------------
源码服务专家
官网: 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.Data.OleDb;
//using System.Data.SqlClient;
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;
//该源码下载自www.51aspx.com()
/// <summary>

@ -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;
//该源码下载自www.51aspx.com()
/// <summary>
/// login 的摘要说明
/// </summary>
public class login

@ -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;
/// <summary>
/// re 的摘要说明
/// </summary>
public class re
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="add_news.aspx.cs" Inherits="admin_m_add_news" ValidateRequest="false" %>
<%@ Register Assembly="DXControls" Namespace="DXControls" TagPrefix="cc1" %>
<!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 id="Head1" runat="server">
<title>新闻发布系统--后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
color: #000000;

@ -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 admin_m_add_news : System.Web.UI.Page
{
//该源码下载自www.51aspx.com()

@ -0,0 +1,15 @@
iframe.Editor_Composition
{
border: 2px inset;
}
.Editor_Reply
{
border : 1px dashed buttonface;
}
table.Editor_Body
{
background-color:gainsboro;
border:1px solid #CCCCCC;
}
.yToolbar
{

@ -0,0 +1,15 @@
var Editor_edit; //selectRang
var Editor_RangeType;
var Editor_selection;
var Editor_filterScript = true;
var Editor_charset="UTF-8";
var Editor_bLoad=false;
var Editor_pureText=true;
var Editor_bTextMode=1; //Ĭ<><C4AC>ΪDesignģʽ
//Ԥ<><D4A4>
function Editor_InitDocument(hiddenid, charset)
{
if (charset!=null)
Editor_charset=charset;
if (Editor_bIsIE5){

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--˵<><CBB5></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link rel="stylesheet" type="text/css" href="pop.css">
</HEAD>
<BODY bgcolor="menu">
<table border="0" cellspacing="10" cellpadding="0" align=center style="padding-left:10px">
<tr>
<td style="line-height:20px;">
<center><font class=title><EFBFBD><EFBFBD><EFBFBD><EFBFBD>˵<EFBFBD><EFBFBD></font></center>
<hr width=100% ><font color="#4D0CAF">
1.Ctrl+enter <20>ɿ<EFBFBD><C9BF><EFBFBD><EFBFBD><br>
2.<2E><><EFBFBD> HTML <20>ɽ<EFBFBD><C9BD>б༭Դ<E0BCAD><D4B4><br>
3.<2E><><EFBFBD> View&nbsp; <20>ɽ<EFBFBD><C9BD><EFBFBD>Ч<EFBFBD><D0A7>Ԥ<EFBFBD><D4A4><br>

@ -0,0 +1,15 @@
if (Editor_bIsIE5){
var IframeID=frames["Editor_Composition"];
}
else{
var IframeID=document.getElementById("Editor_Composition").contentWindow;
var Editor_bIsNC=true;
}
if (Editor_bLoad==false)
{
Editor_InitDocument("Body","GB2312");
}
function InitDocument()
{
IframeID.document.body.innerHTML=EditorName.value;
EditorName.value="";

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><>ɫ<EFBFBD><EFBFBD><E5B9A4></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link rel="stylesheet" type="text/css" href="pop.css">
<script language="javascript">
var Dvbbs_IsIE5 = (navigator.userAgent.indexOf("IE 5") > -1) || (navigator.userAgent.indexOf("IE 6") > -1);
var Dvbbs_IsIE4 = document.all&&navigator.userAgent.indexOf("Opera")==-1
function InitColorPalette() {
if (Dvbbs_IsIE4){
var x = document.all.tags('td');}
else{
var x = document.getElementsByTagName('td');}
for (var i=0; i<x.length; i++) {

@ -0,0 +1,10 @@
body{
font-size: 9pt; font-family:Arial;
background-color:gainsboro;
}
td,select,div,span,button { font-size: 9pt; font-family:Arial; }
BUTTON {width:5em; border-width: 1pt; }
input { border: 1pt solid black; font-size: 9pt; background: url("edit/inputbg.gif"); padding:1pt 3pt;}
.title {font-weight:bold}
a:link { color: #0000BB }
a:visited { color: #0000BB }

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><><EFBFBD><EFBFBD><EFBFBD></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link rel="stylesheet" type="text/css" href="pop.css">
<SCRIPT LANGUAGE=JavaScript FOR=Ok EVENT=onclick>
window.returnValue = a.value+"*"+b.value+"*"+(c.checked?"1":"0")+"*";
window.close();
</SCRIPT>
<script>
function IsDigit()
{
return ((event.keyCode >= 48) && (event.keyCode <= 57));
}
</script>

@ -0,0 +1,15 @@
<HTML><HEAD>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><><EFBFBD><EFBFBD> Real Media <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<Link rel="stylesheet" type="text/css" href="pop.css">
<SCRIPT event=onclick for=Ok language=JavaScript>
var s=path.value;
if (s.length<10)
{
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ<EFBFBD><D6B7>");
}else{
var autostart
autostart=document.getElementById("autostart").checked
window.returnValue = path.value+"*"+selrow.value+"*"+selcol.value+"*"+ autostart
window.close();

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><>ɫ<EFBFBD><EFBFBD><E5B9A4></TITLE>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<Link rel="stylesheet" type="text/css" href="pop.css">
<SCRIPT LANGUAGE=JavaScript>
var SelRGB = '#000000';
var DrRGB = '';
var SelGRAY = '120';
var hexch = new Array('0', '1', '2', '3', '4', '5', '6', '7', '8', '9', 'A', 'B', 'C', 'D', 'E', 'F');
function ToHex(n)
{ var h, l;

@ -0,0 +1,15 @@
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta HTTP-EQUIV=Expires CONTENT=0>
<TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD></TITLE>
<Link rel="stylesheet" type="text/css" href="pop.css">
<style type="text/css">
.Disactive { border-right: 1px solid; border-top: 1px solid; border-left: 1px solid; width: 1%; cursor: hand; border-bottom: 1px solid; background-color: #dedbd6; text-align: center; }
.Active { cursor: hand; background-color: #ffffcc; text-align: center; }
.MainTable { border-right: #e8e8e8 5px solid; border-top: #e8e8e8 5px solid; border-left: #e8e8e8 5px solid; border-bottom: #e8e8e8 5px solid; }
.Sample { border-right: 1px solid; border-top: 1px solid; font-size: 24px; border-left: 1px solid; border-bottom: 1px solid; background-color: #dedbd6; }
.Empty { border-right: 1px solid; border-top: 1px solid; border-left: 1px solid; width: 1%; cursor: default; border-bottom: 1px solid; background-color: #dedbd6; }
</style>

@ -0,0 +1,15 @@
<HTML><HEAD><TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><><EFBFBD><EFBFBD> Flash <20><><EFBFBD><EFBFBD></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<meta HTTP-EQUIV=Expires CONTENT=0>
<Link rel="stylesheet" type="text/css" href="pop.css">
<SCRIPT event=onclick for=Ok language=JavaScript>
var s=path.value;
if (s.length<10)
{
alert('<27><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ<EFBFBD><D6B7>');
}else{
window.returnValue = path.value+"*"+selrow.value+"*"+selcol.value
window.close();
}
</SCRIPT>
<script>

@ -0,0 +1,15 @@
<HTML>
<HEAD>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<meta HTTP-EQUIV=Expires CONTENT=0>
<Link rel="stylesheet" type="text/css" href="pop.css">
<script language="JavaScript">
var sAction = "INSERT";
var sTitle = "<22><><EFBFBD><EFBFBD>";
var oControl;
var oSeletion;
var sRangeType;
var sRow = "1";
var sCol = "1";
var sAlign = "";
var sBorder = "1";

@ -0,0 +1,15 @@
<HTML><HEAD><TITLE><EFBFBD><EFBFBD>ܱ༭<EFBFBD><EFBFBD>--<2D><><EFBFBD><EFBFBD> MediaPlayer <20><><EFBFBD><EFBFBD><EFBFBD><EFBFBD></TITLE>
<META content="text/html; charset=gb2312" http-equiv=Content-Type>
<Link rel="stylesheet" type="text/css" href="pop.css">
<SCRIPT event=onclick for=Ok language=JavaScript>
var s=path.value
if (s.length<10 )
{
alert("<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD><EFBFBD>ȷ<EFBFBD><C8B7><EFBFBD>ļ<EFBFBD><C4BC><EFBFBD><EFBFBD>ӵ<EFBFBD>ַ<EFBFBD><D6B7>");
}else{
var autostart
autostart=document.getElementById("autostart").checked
window.returnValue = path.value+"*"+ autostart +"*"+width.value+"*"+height.value
window.close();
}
</SCRIPT>

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login.aspx.cs" Inherits="admin_m_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>
<table>
<tr>
<td style="width: 100px">
用户名:</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 admin_m_login : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="login_out.aspx.cs" Inherits="admin_m_login_out" %>
<!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>
</div>
</form>
</body>

@ -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 admin_m_login_out : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="main_manage.aspx.cs" Inherits="admin_m_main_manage" %>
<!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 id="Head1" runat="server">
<title>新闻发布系统--后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
color: #000000;
}
body {

@ -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 admin_m_main_manage : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="update_news.aspx.cs" Inherits="admin_m_update_news" %>
<%@ Register Assembly="DXControls" Namespace="DXControls" TagPrefix="cc1" %>
<!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 id="Head1" runat="server">
<title>新闻发布系统--后台管理</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<style type="text/css">
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
color: #000000;

@ -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 admin_m_update_news : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,6 @@
.tbbk {
font-family: "<22><><EFBFBD><EFBFBD><EFBFBD><EFBFBD>";
font-size: 12px;
color: #333333;
border: 1px solid #FF9933;
}

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="news.aspx.cs" Inherits="news" %>
<%@ Register Src="search.ascx" TagName="search" TagPrefix="uc2" %>
<%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<!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>51aspx简单入门新闻系统</title>
<style type="text/css">
<!--
body {
margin: 0 auto;

@ -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 news : System.Web.UI.Page
{

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="news_show.aspx.cs" Inherits="news_show" %>
<%@ Register Src="search.ascx" TagName="search" TagPrefix="uc2" %>
<%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<!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 id="Head1" runat="server">
<title>51aspx简单新闻发布系统</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" /><style type="text/css">
<!--
body,td,th {
font-family: 新宋体;

@ -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 news_show : System.Web.UI.Page
{
string Auther;
protected void Page_Load(object sender, EventArgs e)

@ -0,0 +1,15 @@
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="query.aspx.cs" Inherits="query" %>
<%@ Register Src="top.ascx" TagName="top" TagPrefix="uc1" %>
<!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 id="Head1" runat="server">
<title>无标题页</title>
<style type="text/css">
<!--
body{
margin:0 auto;
text-align:center;
}

@ -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 query : System.Web.UI.Page
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="search.ascx.cs" Inherits="search" %>
<table>
<tr>
<td style="width: 142px">
<asp:DropDownList ID="DropDownList1" runat="server">
<asp:ListItem Value="1">国际新闻</asp:ListItem>
<asp:ListItem Value="2">国内新闻</asp:ListItem>
<asp:ListItem Value="3">山东新闻</asp:ListItem>
</asp:DropDownList></td>
</tr>
<tr>
<td style="width: 142px">
<asp:TextBox ID="TextBox1" runat="server" Width="85px"></asp:TextBox></td>
</tr>
<tr>

@ -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 search : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{

@ -0,0 +1,15 @@
<%@ Control Language="C#" AutoEventWireup="true" CodeFile="top.ascx.cs" Inherits="top" %>
<style>
<!--
body,td,th {
font-family: 宋体;
font-size: 12px;
color: #000000;
}
body {
margin-left: 0px;
margin-top: 0px;
margin-right: 0px;
margin-bottom: 0px;
}
-->

@ -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 top : System.Web.UI.UserControl
{
protected void Page_Load(object sender, EventArgs e)
{
Loading…
Cancel
Save