当前位置: 首页 > news >正文 专业模板网站制作服务什么网站详情页做的好 news 2025/10/28 16:14:27 专业模板网站制作服务,什么网站详情页做的好,计算机应用技术网站开发与应用,广东企业网站模板设计一、实验内容 1、设计一个用户登录页面webform1.aspx#xff0c;效果如下图所示#xff1a; 2、点击webform1.aspx中“还未注册”连接进入register.aspx#xff0c;注册页面效果如下图所示#xff1a;点击用户注册信息到usershow.aspx页面#xff0c;并显示注册的用户信息…一、实验内容 1、设计一个用户登录页面webform1.aspx效果如下图所示 2、点击webform1.aspx中“还未注册”连接进入register.aspx注册页面效果如下图所示点击用户注册信息到usershow.aspx页面并显示注册的用户信息。 3、用户分别使用admin和user账户登录系统分别进入admin.aspx和user.aspx页面并采用session方法设计权限控制避免用户通过链接直接访问admin.aspx与user.aspx页面。 4、点击webform1.aspx页面中“记住我”复选框实现用户免登录功能。如将“记住我”复选框修改为如下图所示修改并实现其功能。 二、代码实现 这是个实验我就一节课做了一点点内容就暂时存一下我目前的进度对于session和cookie相关的知识点我还是不太能正确使用所以在重新学习一遍之后再继续完善题目的要求吧。目前的内容代码如下 webform1.aspx代码 % Page LanguageC# AutoEventWireuptrue CodeBehindWebForm1.aspx.cs InheritsWebApplication2.WebForm1 %!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml head runatserver meta http-equivContent-Type contenttext/html; charsetutf-8/title/titlelink relstylesheet hrefStyleSheet1.css/style typetext/css.auto-style1 {width: 100%;height: 80px;}.auto-style2 {width: 494px;}.auto-style3 {margin-left: 0px;}.auto-style4 {height: 403px;}/style /head bodyform idform1 runatserverdivbr /div idlogindiv idtop classauto-style4h1nbsp;/h1h1用户登录/h1pnbsp;/ptable classauto-style1trtd classauto-style2asp:TextBox IDTextBox1 runatserver CssClasstxt1 ForeColorSilver用户名/asp:TextBox/td/trtrtd classauto-style2asp:TextBox IDTextBox2 runatserver CssClasstxt1 ForeColorSilver密码/asp:TextBox/td/tr/tablepnbsp;/ppasp:CheckBox IDCheckBox1 runatserver CssClasstxt1 Text记住我 OnCheckedChangedCheckBox1_CheckedChanged //ppasp:Button IDButton1 runatserver CssClassauto-style3 Height50px OnClickButton1_Click Text登录 Width210px BackColor#337AB7 //ppnbsp;asp:LinkButton IDLinkButton1 runatserver OnClickLinkButton1_Click还未注册/asp:LinkButton nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;nbsp;asp:LinkButton IDLinkButton2 runatserver忘记密码/asp:LinkButton/pbr /br //div/div/div/form /body /htmlstylesheet1.css代码 body {margin: 80px auto;background-color: #9CBE74; } #login{background-color:white;height:500px;width:500px;border:1px solid black;margin:auto;} #login table{height:90px;width:500px;margin:auto;} #top {height: 400px;width: 500px;text-align: center;margin:auto; }.txt1{height:40px;width:350px; } webform1.aspx.cs代码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;namespace WebApplication2 {public partial class WebForm1 : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){}protected void LinkButton1_Click(object sender, EventArgs e){Response.Redirect(register.aspx);}protected void Button1_Click(object sender, EventArgs e){if (TextBox1.Text admin TextBox2.Text 123){Session[user] admin;Response.Redirect(admin.aspx);}else if (TextBox1.Text User TextBox2.Text 1234){Session[user] User;Response.Redirect(user.aspx);}else{Response.Write(scriptalert(账号或密码错误);/script);}}} } register.aspx代码 % Page LanguageC# AutoEventWireuptrue CodeBehindregister.aspx.cs InheritsWebApplication2.register %!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml head runatserver meta http-equivContent-Type contenttext/html; charsetutf-8/title/titlelink relstylesheet hrefStyleSheet2.css/style typetext/css.auto-style1 {width: 80%;height: 150px;}.auto-style4 {width: 100%;}.auto-style5 {width: 141px;}.auto-style6 {width: 141px;height: 60px;}.auto-style7 {height: 60px;}/style /head bodyform idform1 runatserver methodpost actionusershow.aspxdivdiv idlogin2h1nbsp;/h1h1用户注册页面/h1hr /div idxinxibr /table classauto-style1trtd colspan1table classauto-style4trtd classauto-style6用户名/tdtd classauto-style7asp:TextBox IDTextBox6 runatserver CssClasstxt ForeColorSilver请输入用户名/asp:TextBox/td/trtrtd classauto-style5密码/tdtdasp:TextBox IDTextBox7 runatserver CssClasstxt ForeColorSilver请输入密码/asp:TextBox/td/trtrtd classauto-style5确认/tdtdasp:TextBox IDTextBox8 runatserver CssClasstxt ForeColorSilver请再次输入密码/asp:TextBox/td/trtrtd classauto-style5姓名/tdtdasp:TextBox IDTextBox9 runatserver CssClasstxt ForeColorSilver请输入真实姓名/asp:TextBox/td/trtrtd classauto-style5邮箱/tdtdasp:TextBox IDTextBox10 runatserver CssClasstxt ForeColorSilver请输入电子邮箱/asp:TextBox/tr/tablebr /asp:Button IDButton1 runatserver Height44px Text提交注册 Width125px //td/tr/table/div/div/div/form /body /htmlregister.aspx.cs代码 using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;namespace WebApplication2 {public partial class register : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){}protected void Button1_Click(object sender, EventArgs e){Response.Redirect(usershow.aspx);}} } stylesheet2.css代码 body {background-color:darkgray; } #login2{background-color:white;height:550px;width:600px;border:1px solid black;margin:30px auto;text-align:center; }#login2 h1 {color:cornflowerblue;}#login2 hr {height: 2px;width: 580px;margin: auto;color: cornflowerblue;} #login2 table{margin:0px auto;height:250px;width:500px; } .txt {height: 20px;width: 300px; } usershow.aspx代码 % Page LanguageC# AutoEventWireuptrue CodeBehindusershow.aspx.cs InheritsWebApplication2.usershow %!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml head runatserver meta http-equivContent-Type contenttext/html; charsetutf-8/title/title /head bodyform idform1 runatserverdivbr /所要注册的用户信息br /br /br /用户名asp:Label IDLabel1 runatserver TextLabel/asp:Labelbr /br /密码asp:Label IDLabel2 runatserver TextLabel/asp:Labelbr /br /确认密码asp:Label IDLabel3 runatserver TextLabel/asp:Labelbr /br /姓名asp:Label IDLabel4 runatserver TextLabel/asp:Labelbr /br /邮箱asp:Label IDLabel5 runatserver TextLabel/asp:Label/div/form /body /htmlusershow.aspx.cs代码(注意这里使用的是request的post方法所以需要在register.aspx源代码中添加相应的代码 ) using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls;namespace WebApplication2 {public partial class usershow : System.Web.UI.Page{protected void Page_Load(object sender, EventArgs e){Label1.Text Request.Form[TextBox6];Label2.Text Request.Form[TextBox7];Label3.Text Request.Form[TextBox8];Label4.Text Request.Form[TextBox9];Label5.Text Request.Form[TextBox10];}} } 然后就是新建了两个网页admin.aspx和user.aspx但是里面的内容只有一句话所以就不贴出来了后面完善之后再贴。 三、完成结果演示 当随便输入用户名和密码时 会出现一个弹窗输出账号或密码错误 当输入用户名为admin密码为123时则会进入admin页面 用户名为user而密码为1234时进入user界面 当点击还未注册则进入注册页面这里缺少注册信息的限制以及相应的验证控件 提交注册之后会显示当前需要注册的用户信息 暂时就完成了这些内容。后面继续补充吧。 虽然感觉自己整节课都很忙但是这么总结一下感觉也没有做出来多少东西就只是模模糊糊的完成了前三个要求后面的cookie我刚才尝试了一下无法得到要求所以再学习一下再补充吧。 文章转载自: http://www.morning.qyqdz.cn.gov.cn.qyqdz.cn http://www.morning.ffbl.cn.gov.cn.ffbl.cn http://www.morning.kjfsd.cn.gov.cn.kjfsd.cn http://www.morning.bxqpl.cn.gov.cn.bxqpl.cn http://www.morning.mcpdn.cn.gov.cn.mcpdn.cn http://www.morning.gqtxz.cn.gov.cn.gqtxz.cn http://www.morning.mtcnl.cn.gov.cn.mtcnl.cn http://www.morning.qygfb.cn.gov.cn.qygfb.cn http://www.morning.hkpn.cn.gov.cn.hkpn.cn http://www.morning.xbckm.cn.gov.cn.xbckm.cn http://www.morning.nbfkk.cn.gov.cn.nbfkk.cn http://www.morning.qmmfr.cn.gov.cn.qmmfr.cn http://www.morning.wmyqw.com.gov.cn.wmyqw.com http://www.morning.qlrwf.cn.gov.cn.qlrwf.cn http://www.morning.wbnsf.cn.gov.cn.wbnsf.cn http://www.morning.mkxxk.cn.gov.cn.mkxxk.cn http://www.morning.jzlkq.cn.gov.cn.jzlkq.cn http://www.morning.mfct.cn.gov.cn.mfct.cn http://www.morning.cpfx.cn.gov.cn.cpfx.cn http://www.morning.kjlhb.cn.gov.cn.kjlhb.cn http://www.morning.pdxqk.cn.gov.cn.pdxqk.cn http://www.morning.cwfkm.cn.gov.cn.cwfkm.cn http://www.morning.mhdwp.cn.gov.cn.mhdwp.cn http://www.morning.dangaw.com.gov.cn.dangaw.com http://www.morning.pyxwn.cn.gov.cn.pyxwn.cn http://www.morning.mdnnz.cn.gov.cn.mdnnz.cn http://www.morning.nbiotank.com.gov.cn.nbiotank.com http://www.morning.ltbwq.cn.gov.cn.ltbwq.cn http://www.morning.rcrnw.cn.gov.cn.rcrnw.cn http://www.morning.dxrbp.cn.gov.cn.dxrbp.cn http://www.morning.pqwjh.cn.gov.cn.pqwjh.cn http://www.morning.qddtd.cn.gov.cn.qddtd.cn http://www.morning.spxk.cn.gov.cn.spxk.cn http://www.morning.wnkqt.cn.gov.cn.wnkqt.cn http://www.morning.fqqlq.cn.gov.cn.fqqlq.cn http://www.morning.c7498.cn.gov.cn.c7498.cn http://www.morning.gghhmi.cn.gov.cn.gghhmi.cn http://www.morning.nzsdr.cn.gov.cn.nzsdr.cn http://www.morning.lpppg.cn.gov.cn.lpppg.cn http://www.morning.niukaji.com.gov.cn.niukaji.com http://www.morning.lhygbh.com.gov.cn.lhygbh.com http://www.morning.zmlbq.cn.gov.cn.zmlbq.cn http://www.morning.skdrp.cn.gov.cn.skdrp.cn http://www.morning.kpcxj.cn.gov.cn.kpcxj.cn http://www.morning.gkktj.cn.gov.cn.gkktj.cn http://www.morning.npmpn.cn.gov.cn.npmpn.cn http://www.morning.qhrdx.cn.gov.cn.qhrdx.cn http://www.morning.junmap.com.gov.cn.junmap.com http://www.morning.mqpdl.cn.gov.cn.mqpdl.cn http://www.morning.rzmzm.cn.gov.cn.rzmzm.cn http://www.morning.dongyinet.cn.gov.cn.dongyinet.cn http://www.morning.nrbcx.cn.gov.cn.nrbcx.cn http://www.morning.qzglh.cn.gov.cn.qzglh.cn http://www.morning.psdsk.cn.gov.cn.psdsk.cn http://www.morning.mbmtz.cn.gov.cn.mbmtz.cn http://www.morning.djmdk.cn.gov.cn.djmdk.cn http://www.morning.rqhdt.cn.gov.cn.rqhdt.cn http://www.morning.brld.cn.gov.cn.brld.cn http://www.morning.wkjzt.cn.gov.cn.wkjzt.cn http://www.morning.grnhb.cn.gov.cn.grnhb.cn http://www.morning.nyfyq.cn.gov.cn.nyfyq.cn http://www.morning.lnwdh.cn.gov.cn.lnwdh.cn http://www.morning.gskzy.cn.gov.cn.gskzy.cn http://www.morning.brwei.com.gov.cn.brwei.com http://www.morning.ampingdu.com.gov.cn.ampingdu.com http://www.morning.zmtrk.cn.gov.cn.zmtrk.cn http://www.morning.bnygf.cn.gov.cn.bnygf.cn http://www.morning.kqfdrqb.cn.gov.cn.kqfdrqb.cn http://www.morning.gbpanel.com.gov.cn.gbpanel.com http://www.morning.zrkp.cn.gov.cn.zrkp.cn http://www.morning.zplzj.cn.gov.cn.zplzj.cn http://www.morning.gcthj.cn.gov.cn.gcthj.cn http://www.morning.mdmxf.cn.gov.cn.mdmxf.cn http://www.morning.mnygn.cn.gov.cn.mnygn.cn http://www.morning.rnqbn.cn.gov.cn.rnqbn.cn http://www.morning.zqsnj.cn.gov.cn.zqsnj.cn http://www.morning.wqnc.cn.gov.cn.wqnc.cn http://www.morning.rgfx.cn.gov.cn.rgfx.cn http://www.morning.jwefry.cn.gov.cn.jwefry.cn http://www.morning.mkydt.cn.gov.cn.mkydt.cn 查看全文 http://www.tj-hxxt.cn/news/257099.html 相关文章: 寿光市建设局网站做视频网站应该选什么服务器 公司网站建设需推广wordpress自带搜索 网站主办单位变更wordpress 您没有足够的权限 网站建设项目验收报告wordpress插件地图标记 音乐盒网站源码北京传媒公司排行榜 网站设置不能通过链接访问美食网站建设实施方案 视频网站开发工程师全媒体运营技巧和工具 南昌 网站制作html基本结构代码 门户网站的区别网站编辑信息怎么做 dfv印花图案设计网站怎么在家开网店挣钱呢 重庆公司企业网站建设网站建设计划表模板下载 阿里云 拦截网站个人网站备案拍照 农业网站建设能自己做头像的网站 定制做网站报价品展示设计网站 建设局网站买卖合同seo排名优化工具 百度网站提交了多久收录谷歌浏览器官网入口 网站积分方案莱芜雪野湖风景区介绍 模板网站怎么做网站开发主要用到哪些工具 泰安整站优化网站开发 案例详解 杭州网站推广方案平台广州的企业网站建设 图片背景在网站建设中天眼 网站配色案例鹤壁做网站优化 企业网站建设费用入什么科目上海网站seo牛巨微 在线网站免费网站入口打开百度首页 网站打开是目录结构图2012版本wordpress 网站建设环境分析昆明网站快速优化排名 东营网站开发公司个人网站有哪些网站 免费搭建网站 优帮云大学网站模板下载 seo快速排名站外流量推广wordpress支付宝扫码支付宝 pc网站案例网站制作公司排行榜前十名