分享web开发知识

注册/登录|最近发布|今日推荐

主页 IT知识网页技术软件开发前端开发代码编程运营维护技术分享教程案例
当前位置:首页 > 软件开发

基于ASP.NET的新闻管理系统(三)代码展示

发布时间:2023-09-06 02:14责任编辑:顾先生关键词:.NET

5.1.1栏目部分

增加栏目(addLanMu.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title></title>

<linkrel="stylesheet"type="text/css"href="../css/style.css"/>

<styletype="text/css">

body{ background-image:url(‘backgroundimgs/bg003.jpg‘);background-size: cover;}

#submitLanMu,#backlanmu

{

color:White;

width:100px;

height: 35px;

outline: none;

margin:10px50px;

border: none;

line-height: 35px;

border-radius: 50px;

position: relative;

border: rgba(255,255,255,0.2)2pxsolid;

color: var(--color);

-webkit-transition: 0.25s;

transition: 0.25s;

}

#submitLanMu:hover,#submitLanMu:focus{box-shadow: inset0002emvar(--hover);}

#submitLanMu{--color: #a972cb;--hover: #cb72aa;}

#backlanmu:hover,#backlanmu:focus{box-shadow: inset-3.5em000var(--hover),inset3.5em000var(--hover);}

#backlanmu{--color: #ff7f82; --hover: #ffdc7f;}

</style>

</head>

<body>

<formrunat="server">

<div>

<div>

<divstyle=" text-align:center">增加栏目</div>

<div>

<asp:LabelText="栏目名:"runat="server"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px"></asp:TextBox>

</div>

<br/>

<asp:ButtonText="确定"runat="server"

/>

<asp:Buttonrunat="server"Text="返回"/>

</div>

</div>

</form>

</body>

</html>

编辑栏目(editLanMu.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title></title>

<linkhref="../css/style.css"rel="stylesheet"type="text/css"/>

<styletype="text/css">

body{ background-image:url(‘backgroundimgs/bg003.jpg‘);background-size: cover;}

#submitEditLanMu,#backtolanmu

{

margin: 30px20px;

padding: 15px20px;

border-radius: 10px;

border: 2pxsolid;

font: 16px‘Open Sans‘,sans-serif;

text-transform: uppercase;

background: none;

outline: none;

cursor: pointer;

-webkit-transition: all.5s;

transition: all.5s;

}

#submitEditLanMu,#backtolanmu{color: #CEFFF1;border-color: #CEFFF1; overflow: hidden; position: relative;}

#submitEditLanMu:hover,#backtolanmu:hover{color: #27323A;}

</style>

</head>

<body>

<formrunat="server">

<div>

<divstyle=" height:150px; border:0">

<divstyle=" text-align:center; color:White">编辑栏目</div>

<div>

<asp:LabelText="栏目名:"runat="server"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px"></asp:TextBox>

</div>

<asp:ButtonText="确定"runat="server"/>

<asp:Buttonrunat="server"Text="返回"/>

</div>

</div>

</form>

</body>

</html>

栏目管理(lanmuManage.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title></title>

<linkhref="../css/style.css"rel="stylesheet"type="text/css"/>

<styletype="text/css">

body{ background-image:url(‘backgroundimgs/bg003.jpg‘);background-size: cover;}

#addLanMu,#backtomanage

{

color:White;

width:100px;

height: 35px;

outline: none;

margin:10px50px;

border: none;

line-height: 35px;

border-radius: 50px;

position: relative;

border: rgba(255,255,255,0.2)2pxsolid;

color: var(--color);

-webkit-transition: 0.25s;

transition: 0.25s;

}

#addLanMu{box-shadow: 0.3em0.3em00var(--color),inset0.3em0.3em00var(--color);}

#addLanMu:hover, #addLanMu:focus{box-shadow: 0000var(--hover),inset6em3.5em00var(--hover);}

#addLanMu{--color: #19bc8b;--hover: #1973bc;}

#backtomanage:hover,#backtomanage:focus{box-shadow: inset0-3.25em00var(--hover);}

#backtomanage{ --color: #000000; --hover: #94e458;}

</style>

</head>

<body>

<formrunat="server">

<divstyle=" height:50px; border:0">

<divstyle="float:left">

<asp:Labelrunat="server"></asp:Label>

</div>

<divstyle="float:right">

<asp:Buttonrunat="server"Text="添加栏目"/>

</div>

</div>

<div>

<div>

<asp:GridViewrunat="server"AutoGenerateColumns="False"

Width="500px"BorderStyle="None">

<Columns>

<asp:BoundFieldDataField="lanMuId"HeaderText="栏目ID">

<ItemStyleHorizontalAlign="Center"Width="100px"BorderStyle="None"/>

</asp:BoundField>

<asp:BoundFieldDataField="lanMuName"HeaderText="栏目名称">

<ItemStyleHorizontalAlign="Center"Width="100px"BorderStyle="None"/>

</asp:BoundField>

<asp:TemplateFieldHeaderText="修改">

<ItemTemplate>

<asp:LinkButtonrunat="server">编辑栏目</asp:LinkButton>

<asp:LinkButtonrunat="server">删除</asp:LinkButton>

</ItemTemplate>

<ItemStyleHorizontalAlign="Center"Width="150px"BorderStyle="None"/>

</asp:TemplateField>

<asp:TemplateFieldHeaderText="管理">

<ItemTemplate>

<asp:LinkButtonrunat="server">设置管理员</asp:LinkButton>

</ItemTemplate>

<ItemStyleHorizontalAlign="Center"Width="100px"BorderStyle="None"/>

</asp:TemplateField>

</Columns>

</asp:GridView>

</div>

</div>

<asp:Buttonrunat="server"Text="返回"style=" float:right; position:absolute; right:110px"/>

</form>

<div>

<div>

版权所有:@ 2018 姚锋 地址:江苏省常熟市南三环路99号 <br/>

联系电话:188xxxxxxxx 邮政编码:215500 <br/>

[<ahref="yf/index.aspx"target="_blank">后台管理</a>]

</div>

</div>

</body>

</html>

5.1.2用户部分

添加用户(addUsers.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title></title>

<linkhref="../css/style.css"rel="stylesheet"type="text/css"/>

<styletype="text/css">

html,body{padding:0;margin:0}

canvas{ display:block}

</style>

</head>

<body>

<formrunat="server">

<div>

<div>

<divstyle=" text-align:center; color:White; ">增加用户</div>

<div>

<imgsrc="loginimages/user_icon_copy.png"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px; color: White;"></asp:TextBox>

</div>

<br/>

<div>

<imgsrc="loginimages/lock_icon_copy.png"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px; color: White;"></asp:TextBox>

</div>

<div>

<asp:ButtonText="确定¨"runat="server"/>

</div>

<div>

<asp:Buttonrunat="server"Text="返回"/>

</div>

</div>

</div>

</form>

<canvas></canvas>

<scriptsrc="loginJavascript/hailang.js"type="text/javascript"></script>

</body>

</html>

编辑用户(editUsers.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title></title>

<linkhref="../css/style.css"rel="stylesheet"type="text/css"/>

<styletype="text/css">

body{ background-image:url(‘backgroundimgs/bg003.jpg‘);background-size: cover;}

#backto,#submitEditUser

{

margin: 30px20px;

padding: 15px20px;

border-radius: 10px;

border: 2pxsolid;

font: 16px‘Open Sans‘,sans-serif;

text-transform: uppercase;

background: none;

outline: none;

cursor: pointer;

-webkit-transition: all.5s;

transition: all.5s;

}

#submitEditUser{

color: #A3F7BF;

border-color: #A3F7BF;

background: -webkit-linear-gradient(left, #a3f7bf, #a3f7bf)no-repeat;

background: linear-gradient(to right, #a3f7bf, #a3f7bf)no-repeat;

background-size: 0%100%;

}

#submitEditUser:hover{background-size: 100%100%; color: #27323A;}

#backto{color: #E4F68F;

border-color: #E4F68F;

background: -webkit-linear-gradient(left, #e4f68f, #e4f68f)no-repeat;

background: linear-gradient(to right, #e4f68f, #e4f68f)no-repeat;

background-size: 100%0%;

}

#backto:hover{background-size: 100%100%; color: #27323A;}

</style>

</head>

<body>

<formrunat="server">

<div>

<div>

<divstyle=" text-align:center; color:White;">编辑用户</div>

<div>

<imgsrc="loginimages/user_icon_copy.png"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px"></asp:TextBox>

</div>

<br/>

<div>

<imgsrc="loginimages/lock_icon_copy.png"/>

<asp:TextBoxrunat="server"style="width:150px; border:0px"></asp:TextBox>

</div>

<asp:ButtonText="确定¨"runat="server"/>

<asp:Buttonrunat="server"Text="返回"/>

</div>

</div>

</form>

</body>

</html>

管理用户(userManage.aspx):

<htmlxmlns="http://www.w3.org/1999/xhtml">

<headrunat="server">

<title>用户管理系统</title>

<linkhref="../css/style.css"rel="stylesheet"type="text/css"/>

<styletype="text/css">

body{ background-image:url(‘backgroundimgs/bg003.jpg‘); background-size: cover;}

#Button1

{

color:White;

width:100px;

height: 35px;

outline: none;

margin:10px50px;

border: none;

line-height: 35px;

border-radius: 50px;

position: relative;

border: rgba(255,255,255,0.2)2pxsolid;

color: var(--color);

-webkit-transition: 0.25s;

transition: 0.25s;

}

#Button1:hover,#Button1:focus{box-shadow: inset6.5em000var(--hover);}

#Button1{--color: #8fc866;--hover: #66c887;}

#back:hover{ color:Black; "></style>

</head>

<body>

<formrunat="server">

<div>

<divstyle=" height:50px; border:0">

<divstyle="float:left">

<asp:Labelrunat="server"style=" color:White;"></asp:Label>

</div>

<divstyle="float:right">

<asp:Buttonrunat="server"Text="添加用户"/>

</div>

</div>

</div>

<div>

<asp:GridViewrunat="server"AutoGenerateColumns="False"

Width="1000px"BorderStyle="None">

<Columns>

<asp:BoundFieldDataField="uid"HeaderText="用户编号">

<ItemStyleHorizontalAlign="Center"Width="100px"BorderStyle="None"/>

</asp:BoundField>

&nb

知识推荐

我的编程学习网——分享web前端后端开发技术知识。 垃圾信息处理邮箱 tousu563@163.com 网站地图
icp备案号 闽ICP备2023006418号-8 不良信息举报平台 互联网安全管理备案 Copyright 2023 www.wodecom.cn All Rights Reserved