分享
分销 收藏 举报 申诉 / 13
播放页_导航下方通栏广告

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

  • 上传人:精****
  • 文档编号:4124350
  • 上传时间:2024-07-30
  • 格式:DOC
  • 页数:13
  • 大小:59.54KB
  • 下载积分:8 金币
  • 播放页_非在线预览资源立即下载上方广告
    配套讲稿:

    如PPT文件的首页显示word图标,表示该PPT已包含配套word讲稿。双击word图标可打开word文档。

    特殊限制:

    部分文档作品中含有的国旗、国徽等图片,仅作为作品整体效果示例展示,禁止商用。设计者仅对作品中独创性部分享有著作权。

    关 键  词:
    计算机网络 工程 新闻 发布 网站
    资源描述:
    计算机网络应用实习报告 班级: 网络工程11002 姓名: 吴超 学号: 201006421 实习日期: 2012.12.10---2012.12。19 1、课程实习的目的和要求: 实验目的: 计算机网络课程设计是《计算机网络》课程后的一个重要的教学环节,是对学生进行的一次较为全面的网络应用程序设计训练。其基本目的是: (1)培养学生理论联系实际的设计思想,训练综合运用所学的基础理论知识,结合生产实际分析和解决网络应用中问题的能力,从而使基础理论知识得到巩固和加深. (2)学习掌握网络应用系统的一般设计过程和方法。 (3)熟悉并掌握运用网络应用中的B/S模式。 实验要求: (1)合理设计系统框图和网站结构图。 (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" Inherits="新?闻?发ぁ?布?.Default” %〉 <!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〉 <style type="text/css”> body{ background-image :url(”Images/2。jpg")} div{ margin-top:320px; margin-left:680px;} 〈/style> </head> <body〉 〈form id=”form1" runat="server"> <div〉 〈table cellpadding=8 cellspacing=0 border=0 〉 〈tr〉 <td style = "font-size:large"〉欢?迎?你?的?到?来ぁ?:阰〈/td〉 </tr> <tr> 〈td width=150>用?户§名?(UserName):〈/td〉〈td><asp:TextBox ID=”txtAdmin" runat="server" Width=200 Height=25px/〉</td> 〈/tr> 〈tr> 〈td width=150〉密ü码?(辍assword)?:</td〉〈td >〈asp:TextBox TextMode=”Password" ID="txtpwd" runat=”server" Width=200 Height=25px/〉</td〉 </tr> <tr> 〈td 〉<asp:Button ID="Button1” runat="server" Text="确ā?认?" Height=25px OnClick="Button1_Click" Width=50px/>〈/td〉 <td 〉<asp:Button ID=”Button2" runat="server" Text=”注痢?册á” Height=25px OnClick=”Button2_Click" Width=50px/〉〈/td〉 〈/tr〉 </table〉 〈/div〉 〈/form〉 〈/body〉 〈/html〉 Default。aspx.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; using System。Data.SqlClient; namespace 新?闻?发ぁ?布? { public partial class Default : System。Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { } protected void Button1_Click(object sender, EventArgs e) { string str = @”Data Source=。;Initial Catalog=新?闻?发ぁ?布?;User ID=jerry;Password=litian;Integrated Security=True"; SqlConnection con = new SqlConnection(str); con。Open(); string select = ”select Name,Password from tb_User where Name=’"+txtAdmin.Text。Trim() + ”’and PassWord=’” + txtpwd.Text.Trim()+ "’”; SqlCommand cnd = new SqlCommand(select, con); SqlDataAdapter dataAdapter = new SqlDataAdapter(); dataAdapter.SelectCommand = cnd; DataSet myDs = new DataSet(); dataAdapter。Fill(myDs); DataTable mytable = 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(); } protected void Button2_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-transitional.dtd”〉 <html xmlns=”http://www。w3.org/1999/xhtml”〉 〈head runat=”server"> 〈title〉新?闻?发ぁ?布?〈/title〉 〈style type =”text/css"> body{ background—image :url("images/register.jpg")} div{ margin—left :150px;margin—top :150px; font—size:large} </style〉 〈/head〉 <body> 〈form id=”form1” runat="server”> 〈div> <table border=0 align=center cellpadding =10px cellspacing =8px style="Font-Size:large"〉 〈tr style=”font-size:larger”> <td colspan=2 >登?入?失骸?败悒?请?先è注痢?册á:阰</td〉 </tr〉 <tr style="Font-Size:x—large” width=400px height =17px > 〈td colspan=2〉用?户§注痢?册á:阰</td> </tr> 〈tr width=400px height=17px 〉 〈td width=200px 〉用?户§号?(辍D)?:阰〈/td〉 <td〉<asp:TextBox ID=”TextBox1” ForeColor=Black runat="server" Width=200px/〉〈/td〉 <td> 〈asp:RegularExpressionValidator ID=”RegularExpressionValidator2” runat=”server” ControlToValidate=”TextBox1” ValidationExpression= \d{5} ErrorMessage="应畖为a5位?数簓字?"> </asp:RegularExpressionValidator></td> 〈/tr 〉 〈tr width=400px height=17px > 〈td width=200px>用?户§名?(辍serName)?:阰</td> 〈td〉<asp:TextBox ID="TextBox2" ForeColor=Black runat="server" Width=200px/〉</td> 〈/tr〉 <tr width=400px height=17px 〉 〈td width=200px〉密ü码?(辍assword)?:阰</td〉 〈td〉<asp:TextBox ID=”TextBox3" TextMode="Password” ForeColor=Black runat=”server" Width=200px/〉</td〉 </tr〉 <tr width=400px height=17px > 〈td width=200px〉确ā?认?密ü码?(辍assword)?:阰〈/td〉 <td〉〈asp:TextBox ID=”TextBox4” TextMode ="Password" ForeColor=Black runat="server" Width=200px/>〈/td> <td width=200px〉〈asp:CompareValidator ID="CompareValidator1” runat="server” ControlToCompare="TextBox3" ControlToValidate=”TextBox4" ErrorMessage=”密ü码?不?一?致?” Display="Dynamic”〉〈/asp:CompareValidator〉〈/td> </tr> 〈tr width=400px height=17px 〉 〈td width=230px>邮?箱?(辍mail)?:阰</td> <td><asp:TextBox ID=”TextBox5” ForeColor=Black runat=”server" Width=200px/></td> <td width=200px> <asp:RegularExpressionValidator ID=”RegularExpressionValidator3" runat="server” ControlToValidate="TextBox5" ValidationExpression=^[\w—]+(\。[\w-]+)*@[\w—]+(\。[\w—]+)+$ ErrorMessage=”必?须?使?用?通?用?邮?箱?"〉</asp:RegularExpressionValidator> <td/〉 </tr> 〈tr width=400px height=17px 〉 <td width=200px>电?话°号?码?(辍el)?:阰〈/td> <td〉<asp:TextBox ID="TextBox6” ForeColor=Black runat=”server” Width=200px/>〈/td> <td width=200px> 〈asp:RegularExpressionValidator ID="RegularExpressionValidator1" runat="server" ControlToValidate="TextBox6" ErrorMessage="(021)12345678或ò021-12345678" ValidationExpression=(\(\d{3}\))|(\d{3}-)?\d{8}>〈/asp:RegularExpressionValidator>〈/td> </tr〉 <tr width=400px height=17px 〉 〈td width=200px>提?交?(Sumit):〈/td〉 〈td〉<asp:Button ID="Button1" runat=”server” Text=”提?交?" OnClick=”Button1_Click” /> 〈/tr〉 </table〉 </div> </form〉 </body〉 </html〉 Register.aspx.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; 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 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()+”’,’"+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=”~/UserControl/head。ascx” TagName=”head" TagPrefix="uc1" %> <%@ Register Src=”~/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。dtd"〉 <html xmlns=”http://www。w3.org/1999/xhtml"> 〈head runat="server"> <title〉〈/title> 〈link rel=”Stylesheet” type=”text/css” href="css/Style.css” /> </head〉 <body class="tempbody"> <form id=”form1" runat="server"〉 〈div class =”tbody"> 〈uc1:head ID=”head" runat="server" /> 〈/div〉 <asp:ContentPlaceHolder ID=”ContentPlaceHolder1" runat="server”> <div align="left”></div> </asp:ContentPlaceHolder〉 〈div class =”footer"〉 <uc2:foot ID="foot” runat="server” /> 〈/div> </form〉 </body〉 〈/html> Head。ascx: <%@ Control Language=”C#” AutoEventWireup="true” CodeBehind="head。ascx.cs” Inherits="新?闻?发ぁ?布?.UserControl.head” %> 〈style type=”text/css"> 。td1 { height: 35px; width: 19%; font-size: 12px; } 。td2 { width: 9%; height: 35px; font—size :15px; } </style〉 〈table style ="width :100%"〉 <tr〉 <td colspan=”10"> <div class="wishTop"〉 <div class=”titleSystemName"> 新?闻?发ぁ?布?系μ统?</div〉 <div class="bglogo"〉 〈asp:Image ID=”Image1” runat="server" ImageUrl="~/Images/logo。gif" /〉 </div> </div> </td> 〈/tr〉 〈tr style=”background—image: url(Images/b4_bg。gif)”〉 〈td class=”td1 "〉 〈asp:Label ID=”dateLabel” runat=”server" Style=”color: #FFFFFF">〈/asp:Label〉 </td> 〈td class=”td2 "> 〈asp:HyperLink ID=”HyperLink1” runat=”server” NavigateUrl="~/HomePage.aspx" Font-Underline="false” ForeColor="black" Style=”font—weight: 800; color: #FFFFFF;”〉首骸?页?</asp:HyperLink〉 〈/td〉 <td class="td2 ”〉 〈asp:HyperLink ID="HyperLink2" runat="server” NavigateUrl=”http://news。ifeng。com/” Font—Underline=”false” ForeColor="black" Style=”font—weight: 700; color: #FFFFFF;”>时骸?事?</asp:HyperLink> </td〉 <td class=”td2 "> <asp:HyperLink ID="HyperLink3” runat="server" NavigateUrl=”http://finance.ifeng。com/" Font—Underline=”false" ForeColor=”black" Style="font-weight: 700; color: #FFFFFF;”>经-济?〈/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〉 </td> <td class=”td2 ”> 〈asp:HyperLink ID=”HyperLink5" runat="server" NavigateUrl=" Font—Underline="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/” Font—Underline="false" ForeColor="black" Style="font-weight: 700; color: #FFFFFF;"〉生Θ?活?</asp:HyperLink〉 〈/td> 〈td class="td2 "〉 〈asp:HyperLink ID=”HyperLink7" runat="server” NavigateUrl=”http://bbs。ifeng。com/" Font—Underline="false" ForeColor=”black” Style=”font—weight: 700; color: #FFFFFF;”〉社?会á〈/asp:HyperLink> 〈/td> <td class=”td2 ”> 〈asp:HyperLink ID=”HyperLink8" runat="server” NavigateUrl="http://sports。ifeng。com/” Font—Underline="false" ForeColor="black” Style=”font-weight: 700; color: #FFFFFF;”>体?育畒</asp:HyperLink> 〈/td> 〈td class="td2 ”> <asp:HyperLink ID="HyperLink9" runat="server" NavigateUrl=" Font—Underline="false" ForeColor=”black" Style=”font—weight: 700; color: #FFFFFF;”>娱?乐?〈/asp:HyperLink> </td> 〈/tr> <tr> <td style="height: 25px; font—size: 12px" colspan="10"> 〈p〉 〈span style=”text-align: left;”>输?入?关?键ü字?:阰 <asp:TextBox ID=”txtKey" runat="server" Width="173px”>〈/asp:TextBox〉 <asp:DropDownList ID="DropDownList1" runat="server"> 〈asp:ListItem Value=0〉时骸?事?</asp:ListItem> 〈asp:ListItem Value=1>经-济?〈/asp:ListItem〉 <asp:ListItem Value=2>军ü事?〈/asp:ListItem〉 〈asp:ListItem Value=3>科?技?</asp:ListItem> <asp:ListItem Value=4〉生Θ?活?〈/asp:ListItem〉 <asp:ListItem Value=5>社?会á</asp:ListItem> 〈asp:ListItem Value=6〉体?育畒〈/asp:ListItem> 〈asp:ListItem Value=7〉娱?乐?〈/asp:ListItem〉 〈/asp:DropDownList> <asp:Button ID=”Button1” runat="server” Text="搜?索÷" OnClick="Button1_Click” /〉</span>〈/p〉 </td〉 </tr> </table> 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; using 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 (DropDownList1。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) Response.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
    展开阅读全文
    提示  咨信网温馨提示:
    1、咨信平台为文档C2C交易模式,即用户上传的文档直接被用户下载,收益归上传人(含作者)所有;本站仅是提供信息存储空间和展示预览,仅对用户上传内容的表现方式做保护处理,对上载内容不做任何修改或编辑。所展示的作品文档包括内容和图片全部来源于网络用户和作者上传投稿,我们不确定上传用户享有完全著作权,根据《信息网络传播权保护条例》,如果侵犯了您的版权、权益或隐私,请联系我们,核实后会尽快下架及时删除,并可随时和客服了解处理情况,尊重保护知识产权我们共同努力。
    2、文档的总页数、文档格式和文档大小以系统显示为准(内容中显示的页数不一定正确),网站客服只以系统显示的页数、文件格式、文档大小作为仲裁依据,个别因单元格分列造成显示页码不一将协商解决,平台无法对文档的真实性、完整性、权威性、准确性、专业性及其观点立场做任何保证或承诺,下载前须认真查看,确认无误后再购买,务必慎重购买;若有违法违纪将进行移交司法处理,若涉侵权平台将进行基本处罚并下架。
    3、本站所有内容均由用户上传,付费前请自行鉴别,如您付费,意味着您已接受本站规则且自行承担风险,本站不进行额外附加服务,虚拟产品一经售出概不退款(未进行购买下载可退充值款),文档一经付费(服务费)、不意味着购买了该文档的版权,仅供个人/单位学习、研究之用,不得用于商业用途,未经授权,严禁复制、发行、汇编、翻译或者网络传播等,侵权必究。
    4、如你看到网页展示的文档有www.zixin.com.cn水印,是因预览和防盗链等技术需要对页面进行转换压缩成图而已,我们并不对上传的文档进行任何编辑或修改,文档下载后都不会有水印标识(原文档上传前个别存留的除外),下载后原文更清晰;试题试卷类文档,如果标题没有明确说明有答案则都视为没有答案,请知晓;PPT和DOC文档可被视为“模板”,允许上传人保留章节、目录结构的情况下删减部份的内容;PDF文档不管是原文档转换或图片扫描而得,本站不作要求视为允许,下载前可先查看【教您几个在下载文档中可以更好的避免被坑】。
    5、本文档所展示的图片、画像、字体、音乐的版权可能需版权方额外授权,请谨慎使用;网站提供的党政主题相关内容(国旗、国徽、党徽--等)目的在于配合国家政策宣传,仅限个人学习分享使用,禁止用于任何广告和商用目的。
    6、文档遇到问题,请及时联系平台进行协调解决,联系【微信客服】、【QQ客服】,若有其他问题请点击或扫码反馈【服务填表】;文档侵犯商业秘密、侵犯著作权、侵犯人身权等,请点击“【版权申诉】”,意见反馈和侵权处理邮箱:1219186828@qq.com;也可以拔打客服电话:0574-28810668;投诉电话:18658249818。

    开通VIP折扣优惠下载文档

    自信AI创作助手
    关于本文
    本文标题:计算机网络工程课设(新闻发布网站).doc
    链接地址:https://www.zixin.com.cn/doc/4124350.html
    页脚通栏广告

    Copyright ©2010-2026   All Rights Reserved  宁波自信网络信息技术有限公司 版权所有   |  客服电话:0574-28810668    微信客服:咨信网客服    投诉电话:18658249818   

    违法和不良信息举报邮箱:help@zixin.com.cn    文档合作和网站合作邮箱:fuwu@zixin.com.cn    意见反馈和侵权处理邮箱:1219186828@qq.com   | 证照中心

    12321jubao.png12321网络举报中心 电话:010-12321  jubao.png中国互联网举报中心 电话:12377   gongan.png浙公网安备33021202000488号  icp.png浙ICP备2021020529号-1 浙B2-20240490   


    关注我们 :微信公众号  抖音  微博  LOFTER               

    自信网络  |  ZixinNetwork