收藏 分销(赏)

计算机网络工程课设(新闻发布网站).doc

上传人:精**** 文档编号:4124350 上传时间:2024-07-30 格式:DOC 页数:13 大小:59.54KB
下载 相关 举报
计算机网络工程课设(新闻发布网站).doc_第1页
第1页 / 共13页
计算机网络工程课设(新闻发布网站).doc_第2页
第2页 / 共13页
计算机网络工程课设(新闻发布网站).doc_第3页
第3页 / 共13页
计算机网络工程课设(新闻发布网站).doc_第4页
第4页 / 共13页
计算机网络工程课设(新闻发布网站).doc_第5页
第5页 / 共13页
点击查看更多>>
资源描述

1、计算机网络应用实习报告班级: 网络工程11002 姓名: 吴超 学号: 201006421 实习日期: 2012.12.10-2012.12。19 1、课程实习的目的和要求: 实验目的:计算机网络课程设计是计算机网络课程后的一个重要的教学环节,是对学生进行的一次较为全面的网络应用程序设计训练。其基本目的是:(1)培养学生理论联系实际的设计思想,训练综合运用所学的基础理论知识,结合生产实际分析和解决网络应用中问题的能力,从而使基础理论知识得到巩固和加深.(2)学习掌握网络应用系统的一般设计过程和方法。(3)熟悉并掌握运用网络应用中的B/S模式。实验要求:(1)合理设计系统框图和网站结构图。(2)

2、根据系统框图设计,编写网页及程序代码.(3)程序设计时,要求使用Java或者。Net语言进行开发,完成课设题目的全部内容。(4)完成课程设计报告。2、 课程实习环境: 笔记本一台(win7 旗舰版,内安装有IIS);Dreamweaver cs6。0软件;Photoshop cs6.0软件;flash cs6。0软件;Sqlserver 2010数据库; Visual Studio 2010;3、 系统框图:4、 系统源码:Default.aspx(登入界面):% Page Language=C” AutoEventWireup=true CodeBehind=”Default。aspx。cs

3、 Inherits=新?闻?发?布?.Default” head runat=server” title新?闻?发?布?/title body background-image :url(”Images/2。jpg) div margin-top:320px; margin-left:680px; /style div table cellpadding=8 cellspacing=0 border=0 tr td style = font-size:large欢?迎?你?的?到?来?:阰/td td width=150用?户名?(UserName):/tdtdasp:TextBox ID=”

4、txtAdmin runat=server Width=200 Height=25px/ /tr tr td width=150密码?(辍assword)?:asp:TextBox TextMode=”Password ID=txtpwd runat=”server Width=200 Height=25px/td td /td td asp:Button ID=”Button2 runat=server Text=”注痢?册” Height=25px OnClick=”Button2_Click Width=50px/td /tr = 0 myDs.Tables0。Rows.Count 0)

5、 Session”Name” = mytable.Rows00.ToString(); SessionPassword” = mytable.Rows01。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(); protected void Bu

6、tton2_Click(object sender, EventArgs e) Response。Redirect(”Register。aspx”); Register。aspx(注册界面): Page Language=”C# AutoEventWireup=true” CodeBehind=”Register.aspx.cs” Inherits=”新?闻?发?布?。Register %!DOCTYPE html PUBLIC /W3C/DTD XHTML 1。0 Transitional/EN” ”http:/www。w3.org/TR/xhtml1/DTD/xhtml1-transiti

7、onal.dtd” title新?闻?发?布?/title style type =”text/css body backgroundimage :url(images/register.jpg) div marginleft :150px;margintop :150px; fontsize:large /style/head form id=”form1” runat=server” div 登?入?失骸?败悒?请?先注痢?册:阰/td /tr td colspan=2用?户注痢?册:阰 tr width=400px height=17px td width=200px 用?户号?(辍D)

8、?:阰/td tdasp:TextBox ID=”TextBox1” ForeColor=Black runat=server Width=200px/td asp:RegularExpressionValidator ID=”RegularExpressionValidator2” runat=”server” ControlToValidate=”TextBox1” ValidationExpression= d5 ErrorMessage=应畖为a5位?数簓字? /tr tr width=400px height=17px td width=200px用?户名?(辍serName)?:阰

9、 tdasp:TextBox ID=TextBox2 ForeColor=Black runat=server Width=200px/ /tr tr width=400px height=17px td width=200px密码?(辍assword)?:阰/td tdasp:TextBox ID=”TextBox3 TextMode=Password” ForeColor=Black runat=”server Width=200px/td /tr td width=200px确?认?密码?(辍assword)?:阰/td /td tr width=400px height=17px td

10、 width=230px邮?箱?(辍mail)?:阰 asp:RegularExpressionValidator ID=”RegularExpressionValidator3 runat=server” ControlToValidate=TextBox5 ValidationExpression=w+(。w-+)*w+(。w+)+$ ErrorMessage=”必?须?使?用?通?用?邮?箱? td/ tr width=400px height=17px 电?话号?码?(辍el)?:阰/td td/td asp:RegularExpressionValidator ID=RegularE

11、xpressionValidator1 runat=server ControlToValidate=TextBox6 ErrorMessage=(021)12345678或021-12345678 ValidationExpression=(d3)|(d3-)?d8/asp:RegularExpressionValidator/td /tr 提?交?(Sumit):/td td /tr /table /form/body/htmlRegister.aspx.cs:using System;using System.Collections。Generic;using System。Linq;u

12、sing System.Web;using System。Web.UI;using System。Web。UI。WebControls;using System.Data;using System.Data.SqlClient;namespace 新?闻?发?布? public partial class Register : System。Web。UI.Page protected void Page_Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) string

13、 str = ”Data Source=.;Initial Catalog=新?闻?发?布?;User ID=jerry;Password=litian;Integrated Security=True”; SqlConnection con = new SqlConnection(str); con。Open(); string select = insert into tb_User(ID,Name,Password,Email,Tel) values(+TextBox1。Text。Trim()+”,”+TextBox2.Text。Trim()+,+TextBox3。Text.Trim()

14、+”,+TextBox5.Text。Trim()+,”+TextBox6。Text。Trim()+); SqlCommand cnd = new SqlCommand(select, con); cnd。ExecuteNonQuery(); Response。Redirect(Default.aspx”); con.Close(); MasterPage。master(母版): Master Language=”C#” AutoEventWireup=”true” CodeFile=mainMaster.master。cs Inherits=mainMaster” Register Src=”

15、/UserControl/foot.ascx TagName=foot” TagPrefix=”uc2 !DOCTYPE html PUBLIC ”/W3C/DTD XHTML 1。0 Transitional/EN ”http:/www。w3.org/TR/xhtml1/DTD/xhtml1-transitional。dtdhead runat=server link rel=”Stylesheet” type=”text/css” href=css/Style.css” /head uc1:head ID=”head runat=server / /div /asp:ContentPlac

16、eHolder div class =”footer /div /formHead。ascx:style type=”text/css 。td1 height: 35px; width: 19%; font-size: 12px; 。td2 width: 9%; height: 35px; fontsize :15px; /styletable style =width :100% tr div class=wishTop 新?闻?发?布?系统?/div div class=bglogo asp:Image ID=”Image1” runat=server ImageUrl=/Images/l

17、ogo。gif / /tr tr style=”backgroundimage: url(Images/b4_bg。gif)” td class=”td1 asp:Label ID=”dateLabel” runat=”server Style=”color: FFFFFF/asp:Label td class=”td2 asp:HyperLink ID=”HyperLink1” runat=”server” NavigateUrl=/HomePage.aspx Font-Underline=false” ForeColor=black Style=”fontweight: 800; colo

18、r: #FFFFFF;”首骸?页?/asp:HyperLink /td 时骸?事? /td 经-济?/asp:HyperLink /td td class=td2 asp:HyperLink ID=HyperLink4 runat=server” NavigateUrl= Font-Underline=”false” ForeColor=black Style=”font-weight: 700; color: #FFFFFF;军事?/asp:HyperLink asp:HyperLink ID=”HyperLink5 runat=server NavigateUrl= FontUnderli

19、ne=false” ForeColor=”black Style=font-weight: 700; color: #FFFFFF;”科?技?/asp:HyperLink /td td class=”td2 ” asp:HyperLink ID=”HyperLink6 runat=server NavigateUrl=”http:/home。ifeng。com/” FontUnderline=false ForeColor=black Style=font-weight: 700; color: #FFFFFF;生?活? td class=td2 asp:HyperLink ID=”Hyper

20、Link7 runat=server” NavigateUrl=”http:/bbs。ifeng。com/ FontUnderline=false ForeColor=”black” Style=”fontweight: 700; color: #FFFFFF;”社?会/asp:HyperLink /td asp:HyperLink ID=”HyperLink8 runat=server” NavigateUrl=http:/sports。ifeng。com/” FontUnderline=false ForeColor=black” Style=”font-weight: 700; colo

21、r: FFFFFF;”体?育畒 /td td class=td2 ” 娱?乐?/asp:HyperLink /tr p span style=”text-align: left;”输?入?关?键字?:阰 /asp:TextBox asp:ListItem Value=0时骸?事? asp:ListItem Value=1经-济?/asp:ListItem 军事?/asp:ListItem asp:ListItem Value=3科?技? asp:ListItem Value=4生?活?/asp:ListItem 社?会 asp:ListItem Value=6体?育畒/asp:ListItem

22、 asp:ListItem Value=7娱?乐?/asp:ListItem /asp:DropDownList asp:Button ID=”Button1” runat=server” Text=搜?索 OnClick=Button1_Click” /p /td Head.ascx。cs:using System;using System.Collections。Generic;using System.Linq;using System。Web;using System。Web.UI;using System.Web.UI。WebControls;using System.Data;us

23、ing System。Data.SqlClient;namespace 新?闻?发?布?.UserControl public partial class head : System.Web.UI。UserControl protected void Page_Load(object sender, EventArgs e) protected void Button1_Click(object sender, EventArgs e) if (DropDownList1.SelectedIndex = 0) Response.Redirect(”时骸?事?。aspx); if (DropDo

24、wnList1。SelectedIndex = 1) Response。Redirect(经济?。aspx); if (DropDownList1。SelectedIndex = 2) Response。Redirect(”军事?.aspx); if (DropDownList1.SelectedIndex = 3) Response.Redirect(科?技?.aspx”); if (DropDownList1.SelectedIndex = 4) Response.Redirect(生?活?。aspx”); if (DropDownList1.SelectedIndex = 5) Resp

25、onse.Redirect(社?会。aspx”); if (DropDownList1。SelectedIndex = 6) Response.Redirect(”体?育畒.aspx); if (DropDownList1.SelectedIndex = 7) Response。Redirect(娱?乐?。aspx); Homapage.aspx(主页):% Page Language=C” AutoEventWireup=”true CodeBehind=”HomePage.aspx。cs Inherits=新?闻?发?布?。HomePage MasterPageFile=/mainMaster.maste

展开阅读全文
部分上传会员的收益排行 01、路***(¥15400+),02、曲****(¥15300+),
03、wei****016(¥13200+),04、大***流(¥12600+),
05、Fis****915(¥4200+),06、h****i(¥4100+),
07、Q**(¥3400+),08、自******点(¥2400+),
09、h*****x(¥1400+),10、c****e(¥1100+),
11、be*****ha(¥800+),12、13********8(¥800+)。
相似文档                                   自信AI助手自信AI助手
搜索标签

当前位置:首页 > 包罗万象 > 大杂烩

移动网页_全站_页脚广告1

关于我们      便捷服务       自信AI       AI导航        获赠5币

©2010-2025 宁波自信网络信息技术有限公司  版权所有

客服电话:4008-655-100  投诉/维权电话:4009-655-100

gongan.png浙公网安备33021202000488号   

icp.png浙ICP备2021020529号-1  |  浙B2-20240490  

关注我们 :gzh.png    weibo.png    LOFTER.png 

客服