commit
267c57f592
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="Login.aspx.cs" Inherits="Account_Login" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
|
||||
<style type="text/css">
|
||||
.style2
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
.style3
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
.style4
|
||||
{
|
||||
text-align: left;
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
|
||||
public partial class Account_Login : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="register.aspx.cs" Inherits="Account_register" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
|
||||
<style type="text/css">
|
||||
.style1
|
||||
{
|
||||
text-align: center;
|
||||
}
|
||||
.style3
|
||||
{
|
||||
width: 96px;
|
||||
}
|
||||
.style4
|
||||
{
|
||||
width: 109px;
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
|
||||
public partial class Account_register : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Configuration;
|
||||
using System.Data;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.Security;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.HtmlControls;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Web.UI.WebControls.WebParts;
|
||||
using System.Xml.Linq;
|
||||
|
||||
using System.Text;
|
||||
using System.Security.Cryptography;//MD5加密需引入的命名空间
|
||||
using System.Data.SqlClient;//数据库操作需引入的命名空间
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
|
||||
/// <summary>
|
||||
///MessageBox 的摘要说明
|
||||
/// </summary>
|
||||
public class MessageBox
|
||||
{
|
||||
public MessageBox()
|
||||
{
|
||||
}
|
||||
|
||||
//参数TxtMesage 为发送的内容
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="ArticleManager.aspx.cs" Inherits="Blog_Article" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<p>
|
||||
<table style="width: 100%; height: 902px;">
|
||||
<tr>
|
||||
<td style="text-align: right">
|
||||
<asp:Button ID="Button1" runat="server" onclick="Button1_Click"
|
||||
style="text-align: right" Text="发表文章" />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td>
|
||||
<table style="width:70%; height: 870px;">
|
||||
<tr>
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Xml.Linq;
|
||||
using System.Data.SqlClient;
|
||||
using System.Data;
|
||||
|
||||
|
||||
public partial class Blog_Article : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
@ -0,0 +1,15 @@
|
||||
<%@ Master Language="C#" MasterPageFile="~/MasterPage.master" AutoEventWireup="true" CodeFile="BlogMasterPage.master.cs" Inherits="Blog_MasterPage" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="head" Runat="Server">
|
||||
<style type="text/css">
|
||||
.style1
|
||||
{
|
||||
width: 135px;
|
||||
text-align: left;
|
||||
}
|
||||
.style2
|
||||
{
|
||||
text-align: left;
|
||||
}
|
||||
</style>
|
||||
</asp:Content>
|
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Blog_MasterPage : System.Web.UI.MasterPage
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,7 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="Index.aspx.cs" Inherits="Blog_Index" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<p>
|
||||
欢迎来到本博客</p>
|
||||
</asp:Content>
|
||||
|
@ -0,0 +1,14 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Blog_Index : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="Massage.aspx.cs" Inherits="Blog_Massage" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<p style="text-align: left">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td style="height: 178px">
|
||||
<div style="text-align: left">
|
||||
<asp:Label ID="Label1" runat="server" Text="评论列表:"></asp:Label>
|
||||
</div>
|
||||
<asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False"
|
||||
DataSourceID="SqlDataSource1" Height="208px" Width="802px">
|
||||
<Columns>
|
||||
<asp:BoundField DataField="Author" HeaderText="Author"
|
||||
SortExpression="Author" />
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
public partial class Blog_Massage : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
//DB db = new DB();
|
||||
//string strSql = "SELECT Subject,Author,Context,Time FROM tb_Revert";
|
||||
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="SendArticle.aspx.cs" Inherits="Blog_SendArticle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<p>
|
||||
<table style="width: 100%; height: 512px;">
|
||||
<tr>
|
||||
<td style="text-align: center; height: 58px">
|
||||
<asp:Label ID="Label1" runat="server" style="font-size: x-large" Text="标题"></asp:Label>
|
||||
|
||||
<asp:TextBox ID="txtboxTitle" runat="server" Height="34px" Width="595px"></asp:TextBox>
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="height: 417px; text-align: center">
|
||||
<asp:TextBox ID="txtboxContext" runat="server" Height="391px"
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Blog_SendArticle : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
protected void btnSend_Click(object sender, EventArgs e)
|
||||
{
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="ShowArticle.aspx.cs" Inherits="Blog_ShowArticle" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<table style="width:100%; height: 360px;">
|
||||
<tr>
|
||||
<td style="text-align: center; height: 23px;">
|
||||
<asp:Label ID="labSubject" runat="server"></asp:Label>
|
||||
<br />
|
||||
</td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td style="text-align: center">
|
||||
<asp:Label ID="labAuthor" runat="server"></asp:Label>
|
||||
</td>
|
||||
</tr>
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
|
||||
public partial class Blog_ShowArticle : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DB db = new DB();
|
||||
|
@ -0,0 +1,15 @@
|
||||
<%@ Page Title="" Language="C#" MasterPageFile="~/Blog/BlogMasterPage.master" AutoEventWireup="true" CodeFile="UserManager.aspx.cs" Inherits="Blog_UserManager" %>
|
||||
|
||||
<asp:Content ID="Content1" ContentPlaceHolderID="ContentPlaceHolder2" Runat="Server">
|
||||
<p style="text-align: left">
|
||||
<table style="width: 100%;">
|
||||
<tr>
|
||||
<td>
|
||||
<asp:SqlDataSource ID="SqlDataSource1" runat="server"
|
||||
ConnectionString="<%$ ConnectionStrings:db_BlogConnectionString %>"
|
||||
SelectCommand="SELECT [UserName], [ID], [IsAdmin] FROM [tb_User]"
|
||||
DeleteCommand="DELETE FROM [tb_User] WHERE [UserName] = @UserName"
|
||||
InsertCommand="INSERT INTO [tb_User] ([UserName], [ID], [IsAdmin]) VALUES (@UserName, @ID, @IsAdmin)"
|
||||
UpdateCommand="UPDATE [tb_User] SET [ID] = @ID, [IsAdmin] = @IsAdmin WHERE [UserName] = @UserName">
|
||||
<DeleteParameters>
|
||||
<asp:Parameter Name="UserName" Type="String" />
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
|
||||
public partial class Blog_UserManager : System.Web.UI.Page
|
||||
{
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
|
||||
}
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
using System;
|
||||
using System.Collections.Generic;
|
||||
using System.Linq;
|
||||
using System.Web;
|
||||
using System.Web.UI;
|
||||
using System.Web.UI.WebControls;
|
||||
using System.Configuration;
|
||||
using System.Data.SqlClient;
|
||||
|
||||
public partial class Blog_UserMassage : System.Web.UI.Page
|
||||
{
|
||||
//查询本用户信息
|
||||
protected void Page_Load(object sender, EventArgs e)
|
||||
{
|
||||
DB db = new DB();
|
@ -0,0 +1,15 @@
|
||||
<%@ Application Language="C#" %>
|
||||
|
||||
<script runat="server">
|
||||
|
||||
void Application_Start(object sender, EventArgs e)
|
||||
{
|
||||
// 在应用程序启动时运行的代码
|
||||
|
||||
}
|
||||
|
||||
void Application_End(object sender, EventArgs e)
|
||||
{
|
||||
// 在应用程序关闭时运行的代码
|
||||
|
||||
}
|
@ -0,0 +1,15 @@
|
||||
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="MasterPage.master.cs" Inherits="MasterPage" %>
|
||||
|
||||
<!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>
|
||||
<asp:ContentPlaceHolder id="head" runat="server">
|
||||
</asp:ContentPlaceHolder>
|
||||
</head>
|
||||
<body>
|
||||
<form id="form1" runat="server">
|
||||
<div style="width: 965px; height: 425px; text-align: right; background-image: url('/MyBlog_use_asp.net/Image/背景图1.jpg');">
|
||||
<asp:Label
|
||||
ID="labUser" runat="server"></asp:Label>
|
@ -0,0 +1,15 @@
|
||||
<?xml version="1.0"?>
|
||||
<!--
|
||||
有关如何配置 ASP.NET 应用程序的详细信息,请访问
|
||||
http://go.microsoft.com/fwlink/?LinkId=169433
|
||||
-->
|
||||
<configuration>
|
||||
<connectionStrings>
|
||||
<add name="ApplicationServices" connectionString="data source=.\SQLEXPRESS;Integrated Security=SSPI;AttachDBFilename=|DataDirectory|\aspnetdb.mdf;User Instance=true" providerName="System.Data.SqlClient"/>
|
||||
<add name="db_BlogConnectionString" connectionString="Data Source=.;Initial Catalog=db_Blog;User ID=sa;Password=51Aspx" providerName="System.Data.SqlClient"/>
|
||||
</connectionStrings>
|
||||
<appSettings>
|
||||
<!-- 数据库服务器名 -->
|
||||
<add key="ConnectionString" value="server=.;Uid=sa;pwd=51Aspx;database=db_Blog;"/>
|
||||
<!-- 存放该网站的文件夹名 -->
|
||||
<add key="FileFloderName" value="MyBlog_use_asp.net"/>
|
Loading…
Reference in new issue