心情:藏起来的目的就是为了被找到。
心情:待人友善是修养,独来独往是性格。
心情:何以致契阔,绕腕双跳脱。
我
姓名:薛皓
班级:2015级计科一班
学号:0112
(二)、留言板
1、我的留言板
点击留言板标后直接进入留言板详细页面,从而看见很多朋友在此留言来吸引游客的好奇心,此页面主要应用以下知识点:
1)Session 、application。
2) 数据库连接
主要代码:
以下为数据库连接建立一个Connection对象实例db 代码
留言:
<%
set conn=("")
connstr="Provider= source="&("")
connstr
%>
<%
Dim sql,bh,xm,ly,rq
Set rs=("")
sql="select bh,xm,ly,rq from lyb"
sql,conn,1,3
%>
Connection对象与数据库建立连接,并对数据库执行添加、删除、等相关操作。AddNew是添加操作。
当表单内容通过post方法提交时,asp的request对象的form方法可以取得提交数据并进行相应的操作。如留言板中的添加操作:
提交数据:
<%
%>
接受数据:
<%
Dim sql,bh,xm,ly,rq
Set rs=("")
sql="select bh,xm,ly,rq from lyb"
sql,conn,1,3
bh=("bh")
xm=("xm")
ly=("ly")
rs("xm")=xm
rs("ly")=ly
Set rs=Nothing
Set Conn=Nothing
%>
2、我的留言界面
此界面为静态页,主要应用而文本框、多行文本框等知识点,将Method 的属性设置为POST。
主要代码:
个人空间
念念不忘,必有回响。
留言板
姓名 | 内容 | 时间 |
姓名 | 留言内容 | 时间 |
---|---|---|
(三)、通讯录
1、我的通讯录
主要代码:
1)数据库的连接
2)循环的输出。
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="" Inherits="Default6" %>
.auto-style1 {
text-align: right;
font-weight: bold;
font-size: larger;
}
.auto-style4 {
border-style: outset;
}
2、添加新记录
主要代码:
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="" Inherits="Default4" %>
.title {
text-align:center;
font-family:'Microsoft YaHei';
font-size:50px;
padding:60px 0 0 0;
color:#ccc;
}
body {
background-image:url(image/;background-size:cover;
}
.auto-style1 {
width: 969px;
border: 5px solid #00FF00;
}
.auto-style6 {
border: 3px solid #008000;
width: 182px;
height: 150px;
font-weight: bold;
font-size: larger;
}
.auto-style7 {
border-style: solid;
border-color: #008000;
width: 618px;
height: 150px;
}
.textbox {
margin-left:5px;
}
.bottom {
margin-left:400px;
margin-top:10px;
}
.sex1 {
margin-left:10px;
}
.sex {
margin-left:20px;
}
.auto-style9 {
border: 3px solid #008000;
width: 182px;
height: 50px;
font-weight: bold;
font-size: larger;
}
.auto-style10 {
color: #A0A0A0;
}
.auto-style11 {
text-decoration: none;
}
.auto-style12 {
color: #000000;
font-size: larger;
font-weight: bold;
}
.auto-style13 {
font-size: larger;
color: #CCCCCC;
padding:0 0 0 180px;
}
.auto-style14 {
font-size: larger;
color: #000000;
padding: 0 0 0 180px;
font-weight: bold;
}
.auto-style15 {
margin-left: 5px;
}
.auto-style16 {}
.auto-style17 {
border-style: solid;
border-color: #008000;
width: 618px;
height: 50px;
}