计算机网络工程课设新闻发布网站.docx

上传人:b****6 文档编号:16770812 上传时间:2023-07-17 格式:DOCX 页数:27 大小:2.65MB
下载 相关 举报
计算机网络工程课设新闻发布网站.docx_第1页
第1页 / 共27页
计算机网络工程课设新闻发布网站.docx_第2页
第2页 / 共27页
计算机网络工程课设新闻发布网站.docx_第3页
第3页 / 共27页
计算机网络工程课设新闻发布网站.docx_第4页
第4页 / 共27页
计算机网络工程课设新闻发布网站.docx_第5页
第5页 / 共27页
计算机网络工程课设新闻发布网站.docx_第6页
第6页 / 共27页
计算机网络工程课设新闻发布网站.docx_第7页
第7页 / 共27页
计算机网络工程课设新闻发布网站.docx_第8页
第8页 / 共27页
计算机网络工程课设新闻发布网站.docx_第9页
第9页 / 共27页
计算机网络工程课设新闻发布网站.docx_第10页
第10页 / 共27页
计算机网络工程课设新闻发布网站.docx_第11页
第11页 / 共27页
计算机网络工程课设新闻发布网站.docx_第12页
第12页 / 共27页
计算机网络工程课设新闻发布网站.docx_第13页
第13页 / 共27页
计算机网络工程课设新闻发布网站.docx_第14页
第14页 / 共27页
计算机网络工程课设新闻发布网站.docx_第15页
第15页 / 共27页
计算机网络工程课设新闻发布网站.docx_第16页
第16页 / 共27页
计算机网络工程课设新闻发布网站.docx_第17页
第17页 / 共27页
计算机网络工程课设新闻发布网站.docx_第18页
第18页 / 共27页
计算机网络工程课设新闻发布网站.docx_第19页
第19页 / 共27页
计算机网络工程课设新闻发布网站.docx_第20页
第20页 / 共27页
亲,该文档总共27页,到这儿已超出免费预览范围,如果喜欢就下载吧!
下载资源
资源描述

计算机网络工程课设新闻发布网站.docx

《计算机网络工程课设新闻发布网站.docx》由会员分享,可在线阅读,更多相关《计算机网络工程课设新闻发布网站.docx(27页珍藏版)》请在冰点文库上搜索。

计算机网络工程课设新闻发布网站.docx

计算机网络工程课设新闻发布网站

计算机网络应用实习报告

 

班级:

网络工程11002

吴超

学号:

201006421

实习日期:

2012.12.10---2012.12.19

 

1、课程实习的目的和要求:

实验目的:

计算机网络课程设计是《计算机网络》课程后的一个重要的教学环节,是对学生进行的一次较为全面的网络应用程序设计训练。

其基本目的是:

(1)培养学生理论联系实际的设计思想,训练综合运用所学的基础理论知识,结合生产实际分析和解决网络应用中问题的能力,从而使基础理论知识得到巩固和加深。

(2)学习掌握网络应用系统的一般设计过程和方法。

(3)熟悉并掌握运用网络应用中的B/S模式。

实验要求:

(1)合理设计系统框图和结构图。

(2)根据系统框图设计,编写网页及程序代码。

(3)程序设计时,要求使用Java或者.Net语言进行开发,完成课设题目的全部容。

(4)完成课程设计报告。

2、课程实习环境:

笔记本一台(win7旗舰版,安装有IIS);

Dreamweavercs6.0软件;

Photoshopcs6.0软件;

flashcs6.0软件;

Sqlserver2010数据库;

VisualStudio2010;

3、系统框图:

 

4、系统源码:

Default.aspx(登入界面):

<%PageLanguage="C#"AutoEventWireup="true"CodeBehind="Default.aspx.cs"Inherits="新?

闻?

发ぁ?

布?

.Default"%>

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"".w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

新?</p><p>闻?</p><p>发ぁ?</p><p>布?</p><p>

body{background-image:

url("Images/2.jpg")}

div{margin-top:

320px;margin-left:

680px;}

large">欢?

迎?

你?

的?

到?

来ぁ?

用?

户§名?

(UserName):

TextBoxID="txtAdmin"runat="server"Width=200Height=25px/>

密ü码?

(辍assword)?

:

TextBoxTextMode="Password"ID="txtpwd"runat="server"Width=200Height=25px/>

ButtonID="Button1"runat="server"Text="确ā?

认?

"Height=25pxOnClick="Button1_Click"Width=50px/>

ButtonID="Button2"runat="server"Text="注痢?

册á"Height=25pxOnClick="Button2_Click"Width=50px/>

Default.aspx.cs:

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Data;

usingSystem.Data.SqlClient;

namespace新?

闻?

发ぁ?

布?

{

publicpartialclassDefault:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

stringstr="DataSource=.;InitialCatalog=新?

闻?

发ぁ?

布?

;UserID=jerry;Password=litian;IntegratedSecurity=True";

SqlConnectioncon=newSqlConnection(str);

con.Open();

stringselect="selectName,Passwordfromtb_UserwhereName='"+txtAdmin.Text.Trim()+"'andPassWord='"+txtpwd.Text.Trim()+"'";

SqlCommandd=newSqlCommand(select,con);

SqlDataAdapterdataAdapter=newSqlDataAdapter();

dataAdapter.SelectCommand=d;

DataSetmyDs=newDataSet();

dataAdapter.Fill(myDs);

DataTablemytable=myDs.Tables[0];

if(myDs!

=null&&myDs.Tables.Count>=0&&myDs.Tables[0].Rows.Count>0)

{

Session["Name"]=mytable.Rows[0][0].ToString();

Session["Password"]=mytable.Rows[0][1].ToString();

if(Session["Name"].ToString()==txtAdmin.Text.Trim()&&Session["Password"].ToString()==txtpwd.Text.Trim())

Response.Redirect("HomePage.aspx");

}

else

{

Response.Redirect("Register.aspx");

}

con.Close();

}

protectedvoidButton2_Click(objectsender,EventArgse)

{

Response.Redirect("Register.aspx");

}

}

}

Register.aspx(注册界面):

<%PageLanguage="C#"AutoEventWireup="true"CodeBehind="Register.aspx.cs"Inherits="新?

闻?

发ぁ?

布?

.Register"%>

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"".w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

新?</p><p>闻?</p><p>发ぁ?</p><p>布?</p><p>

body{background-image:

url("images/register.jpg")}

div{margin-left:

150px;margin-top:

150px;font-size:

large}

large">

larger">

登?

入?

失骸?

败悒?

请?

先è注痢?

册á:

x-large"width=400pxheight=17px>

用?

户§注痢?

册á:

用?

户§号?

(辍D)?

TextBoxID="TextBox1"ForeColor=Blackrunat="server"Width=200px/>

RegularExpressionValidatorID="RegularExpressionValidator2"runat="server"ControlToValidate="TextBox1"

ValidationExpression=\d{5}ErrorMessage="应畖为a5位?

数簓字?

">

RegularExpressionValidator>

用?

户§名?

(辍serName)?

TextBoxID="TextBox2"ForeColor=Blackrunat="server"Width=200px/>

密ü码?

(辍assword)?

TextBoxID="TextBox3"TextMode="Password"ForeColor=Blackrunat="server"Width=200px/>

确ā?

认?

密ü码?

(辍assword)?

TextBoxID="TextBox4"TextMode="Password"ForeColor=Blackrunat="server"Width=200px/>

CompareValidatorID="CompareValidator1"runat="server"ControlToCompare="TextBox3"ControlToValidate="TextBox4"

ErrorMessage="密ü码?

不?

一?

致?

"Display="Dynamic">

CompareValidator>

邮?

箱?

(辍mail)?

TextBoxID="TextBox5"ForeColor=Blackrunat="server"Width=200px/>

RegularExpressionValidatorID="RegularExpressionValidator3"runat="server"ControlToValidate="TextBox5"ValidationExpression=^[\w-]+(\.[\w-]+)*[\w-]+(\.[\w-]+)+$

ErrorMessage="必?

须?

使?

用?

通?

用?

邮?

箱?

">

RegularExpressionValidator>

电?

话°号?

码?

(辍el)?

TextBoxID="TextBox6"ForeColor=Blackrunat="server"Width=200px/>

RegularExpressionValidatorID="RegularExpressionValidator1"runat="server"ControlToValidate="TextBox6"

ErrorMessage="(021)12345678或ò8"ValidationExpression=(\(\d{3}\))|(\d{3}-)?

\d{8}>

RegularExpressionValidator>

提?

交?

(Sumit):

ButtonID="Button1"runat="server"Text="提?

交?

"OnClick="Button1_Click"/>

Register.aspx.cs:

usingSystem;

usingSystem.Collections.Generic;

usingSystem.Linq;

usingSystem.Web;

usingSystem.Web.UI;

usingSystem.Web.UI.WebControls;

usingSystem.Data;

usingSystem.Data.SqlClient;

namespace新?

闻?

发ぁ?

布?

{

publicpartialclassRegister:

System.Web.UI.Page

{

protectedvoidPage_Load(objectsender,EventArgse)

{

}

protectedvoidButton1_Click(objectsender,EventArgse)

{

stringstr="DataSource=.;InitialCatalog=新?

闻?

发ぁ?

布?

;UserID=jerry;Password=litian;IntegratedSecurity=True";

SqlConnectioncon=newSqlConnection(str);

con.Open();

stringselect="insertintotb_User(ID,Name,[Password],Email,Tel)values('"+TextBox1.Text.Trim()+"','"+TextBox2.Text.Trim()+"','"+TextBox3.Text.Trim()+"','"+TextBox5.Text.Trim()+"','"+TextBox6.Text.Trim()+"')";

SqlCommandd=newSqlCommand(select,con);

d.ExecuteNonQuery();

Response.Redirect("Default.aspx");

con.Close();

}

}

}

MasterPage.master(母版):

<%MasterLanguage="C#"AutoEventWireup="true"CodeFile="mainMaster.master.cs"Inherits="mainMaster"%>

<%RegisterSrc="~/UserControl/head.ascx"TagName="head"TagPrefix="uc1"%>

<%RegisterSrc="~/UserControl/foot.ascx"TagName="foot"TagPrefix="uc2"%>

DOCTYPEhtmlPUBLIC"-//W3C//DTDXHTML1.0Transitional//EN"".w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

headID="head"runat="server"/>

ContentPlaceHolderID="ContentPlaceHolder1"runat="server">

ContentPlaceHolder>

footID="foot"runat="server"/>

Head.ascx:

<%ControlLanguage="C#"AutoEventWireup="true"CodeBehind="head.ascx.cs"Inherits="新?

闻?

发ぁ?

布?

.UserControl.head"%>

.td1

{

height:

35px;

width:

19%;

font-size:

12px;

}

.td2

{

width:

9%;

height:

35px;

font-size:

15px;

}

100%">

新?

闻?

发ぁ?

布?

系μ统?

ImageID="Image1"runat="server"ImageUrl="~/Images/logo.gif"/>

url(Images/b4_bg.gif)">

LabelID="dateLabel"runat="server"Style="color:

#FFFFFF">

Label>

HyperLinkID="HyperLink1"runat="server"NavigateUrl="~/HomePage.aspx"Font-Underline="false"

ForeColor="black"Style="font-weight:

800;color:

#FFFFFF;">首骸?

页?

HyperLink>

HyperLinkID="HyperLink2"runat="server"NavigateUrl="news.ifeng./"

Font-Underline="false"ForeColor="black"Style="font-weight:

700;color:

#FFFFFF;">时骸?

事?

HyperLink>

HyperLinkID="HyperLink3"runat="server"NavigateUrl="finance.ifeng./"

Font-Underline="false"ForeColor="black"Style="font-weight:

700;color:

#FFFFFF;">经-济?

HyperLink>

HyperLinkID="HyperLink4"runat="server"NavigateUrl="news.ifeng./mil/"

Font-Underline="false"ForeColor="black"Style="font-weight:

700;color:

#FFFFFF;">军ü事?

HyperLink>

HyperLinkID="HyperLink5"runat="server"NavigateUrl="tech.ifeng./"

Font-Underline="false"ForeColor="black"Style="font-weight:

700;color:

#FFFFFF;">科?

技?

HyperLink>

HyperLinkID="HyperLink6"runat="server"NavigateUrl="home.ifeng./"

Font-Underline="fal

展开阅读全文
相关资源
猜你喜欢
相关搜索
资源标签

当前位置:首页 > 法律文书 > 调解书

copyright@ 2008-2023 冰点文库 网站版权所有

经营许可证编号:鄂ICP备19020893号-2