当前位置: 首页 > news >正文

专业模板网站制作服务郑州建站价格

专业模板网站制作服务,郑州建站价格,收费的网站怎么做的,免费的宣传平台有哪些一、实验内容 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.hkea.cn/news/14562953/

相关文章:

  • 深圳最好的网站开发公司在那儿能找网站建设
  • 做咩有D网站响网吧上不了改版一个网站多少钱
  • 微网站网站模板建站网站设置高度
  • 做微商怎样加入网站卖东西赚钱宁波怎么建网站模板站
  • 复兴网站制作深圳做网站三网合一
  • 成都网站建设行业分析建设银行网站不能打开
  • 如何保持网站中的图片合肥专业网站制作
  • 桂林市电力建设公司网站门户网站建设的书籍
  • 网站几几年做的怎么查做流量网站吗
  • 网站建设孝感网络整合营销的概念
  • 网站qq在线代码怎么取消网站备案
  • 四川建设厅网上查询网站首页南京制作网页学校
  • 建设厅官方网站企业库淮南做网站
  • 做网站不赚钱了线上推广什么意思
  • 服饰网站建设建设游戏网站
  • visual studio制作网站开发医院网站建设多少钱
  • 做这个网站多少钱软件开发模型有哪些
  • 微商手机网站制作公司wordpress微信机器人下载地址
  • 重庆网站备案在那里如何备份wordpress数据库
  • 建设电子商务网站门户网站建设经济交流材料
  • 河北省建设厅网站高端建筑
  • 公司官网用什么建站程序快速建站工具
  • 网站免费进入窗口软件有哪些兰州网站建设q.479185700棒
  • 创建一个网站需要做哪些准备window优化大师官网
  • 苏州建行网站亚马逊雨林面积有多大
  • 商城网站开发商受欢迎的南昌网站建设
  • 网站建设利益上城区建设局网站
  • 自己做网站广告法做排行榜的网站
  • 做网站开发甲方一直要求p图网站营销如何做
  • 布朗新风 中企动力提供网站建设推广普通话的意义