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

做网站需要的带宽上行还是下行asp.net网站开发项...

做网站需要的带宽上行还是下行,asp.net网站开发项...,wordpress视频解析接口,wordpress 菜鸟目录 一、测试要求 二、实现效果 三、实现代码 一、测试要求 二、实现效果 数据库中的内容#xff1a; 使用数据库中的账号登录#xff1a; 若不是数据库中的内容#xff1a; 三、实现代码 login.aspx文件#xff1a; % Page LanguageC# AutoEventW…目录 一、测试要求 二、实现效果 三、实现代码 一、测试要求 二、实现效果 数据库中的内容 使用数据库中的账号登录 若不是数据库中的内容 三、实现代码 login.aspx文件   % Page LanguageC# AutoEventWireuptrue CodeBehindlogin.aspx.cs InheritsWebApplication2.login %!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: 97%;height: 115px;}.auto-style2 {width: 137px;}.auto-style3 {height: 33px;}/style/head bodyform idform1 runatserverdivbr /br /div idloginh1nbsp;/h1h1 classauto-style3登录/h1pnbsp;/ptable classauto-style1trtd classauto-style2用户名/tdtdasp:TextBox IDTextBox1 runatserver CssClasstxt/asp:TextBoxasp:RequiredFieldValidator IDRequiredFieldValidator1 runatserver ControlToValidateTextBox1 ErrorMessage× ForeColorRed/asp:RequiredFieldValidator/td/trtrtd classauto-style2密码/tdtdasp:TextBox IDTextBox2 runatserver CssClasstxt/asp:TextBoxasp:RequiredFieldValidator IDRequiredFieldValidator2 runatserver ControlToValidateTextBox2 ErrorMessage× ForeColorRed/asp:RequiredFieldValidator/td/tr/tablebr /br /br /br /asp:Button IDButton3 runatserver Height38px OnClickButton3_Click Text登录 Width110px /br /br /br /asp:LinkButton IDLinkButton1 runatserver OnClickLinkButton1_Click没有账号立即注册/asp:LinkButton/div/div/form /body /htmllogin.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; using System.Configuration;namespace WebApplication2 {public partial class login : System.Web.UI.Page{string sqlconn ConfigurationManager.ConnectionStrings[userConnString].ToString();//建立connection链接对象这里最好设置成全局变量否则后面每次都得新建SqlConnection myconnection new SqlConnection();protected void Page_Load(object sender, EventArgs e){UnobtrusiveValidationMode UnobtrusiveValidationMode.None;myconnection.ConnectionString sqlconn;//Label1.Text myconnection.State.ToString();}//protected void Button1_Click(object sender, EventArgs e)//{// myconnection.Open();// Label1.Text myconnection.State.ToString();//}//protected void Button2_Click(object sender, EventArgs e)//{// myconnection.Close();// Label1.Text myconnection.State.ToString();//}protected void LinkButton1_Click(object sender, EventArgs e){Response.Redirect(zhuce.aspx);}protected void Button3_Click(object sender, EventArgs e){myconnection.Open();string name TextBox1.Text;string pwd TextBox2.Text;string sqlcmd select * from users where name name and pwd pwd ;SqlCommand mycommand new SqlCommand(sqlcmd, myconnection);SqlDataReader myreader mycommand.ExecuteReader();myreader.Read();if (myreader.HasRows){Response.Write(scriptalert(欢迎访问);/script);}else{Response.Write(scriptalert(账号或密码错误);/script);}myreader.Close();myconnection.Close();}} } stylesheet1.css文件 body {background-color:azure; } #login{width:600px;height:550px;border:1px solid black;background-color:white;margin:50px auto;text-align:center; } #login table{text-align:center; }.txt{height:30px;width:270px; } register.aspx文件zhuce.aspx % Page LanguageC# AutoEventWireuptrue CodeBehindzhuce.aspx.cs InheritsWebApplication2.zhuce %!DOCTYPE htmlhtml xmlnshttp://www.w3.org/1999/xhtml head runatserver meta http-equivContent-Type contenttext/html; charsetutf-8/title/titlelink hrefStyleSheet2.css relstylesheet/style typetext/css.auto-style1 {width: 95%;height: 164px;}.auto-style2 {height: 54px;}.auto-style3 {height: 54px;width: 235px;}.auto-style4 {width: 235px;}/style /head bodyform idform1 runatserverdiv idzhuceh1nbsp;/h1h1注册/h1table classauto-style1trtd classauto-style3用户名/tdtd classauto-style2asp:TextBox IDTextBox1 runatserver CssClasstxt1/asp:TextBoxasp:RequiredFieldValidator IDRequiredFieldValidator1 runatserver ControlToValidateTextBox1 ErrorMessage× ForeColorRed/asp:RequiredFieldValidator/td/trtrtd classauto-style4密码/tdtdasp:TextBox IDTextBox2 runatserver CssClasstxt1/asp:TextBoxasp:RequiredFieldValidator IDRequiredFieldValidator2 runatserver ControlToValidateTextBox2 ErrorMessage× ForeColor#FF3300/asp:RequiredFieldValidator/td/trtrtd classauto-style4确认密码/tdtdasp:TextBox IDTextBox3 runatserver CssClasstxt1/asp:TextBoxasp:CompareValidator IDCompareValidator1 runatserver ControlToCompareTextBox2 ControlToValidateTextBox3 ErrorMessage× ForeColorRed/asp:CompareValidator/td/tr/tablebr /br /asp:Button IDButton1 runatserver Height46px OnClickButton1_Click Text注册 Width133px /br /br /br /asp:LinkButton IDLinkButton1 runatserver OnClickLinkButton1_Click已有帐号立即登录/asp:LinkButtonbr /br /br /br /br /br //div/form /body /htmlregister.aspx.cs文件(zhuce.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; using System.Configuration;namespace WebApplication2 {public partial class zhuce : System.Web.UI.Page{string sqlconn ConfigurationManager.ConnectionStrings[userConnString].ToString();//建立connection链接对象这里最好设置成全局变量否则后面每次都得新建SqlConnection myconnection new SqlConnection();protected void Page_Load(object sender, EventArgs e){UnobtrusiveValidationMode UnobtrusiveValidationMode.None;myconnection.ConnectionString sqlconn;//Label1.Text myconnection.State.ToString();}protected void LinkButton1_Click(object sender, EventArgs e){Response.Redirect(login.aspx);}protected void Button1_Click(object sender, EventArgs e){myconnection.ConnectionString sqlconn;myconnection.Open();string name TextBox1.Text;string pwd TextBox3.Text;string sqlcmd insert into users(name,pwd) values ( name , pwd );SqlCommand mycommand new SqlCommand(sqlcmd, myconnection);mycommand.ExecuteNonQuery();Response.Write(scriptalert(添加成功);/script);myconnection.Close();}//protected void Button2_Click(object sender, EventArgs e)//{// myconnection.Open();// Label1.Text myconnection.State.ToString();//}//protected void Button3_Click(object sender, EventArgs e)//{// myconnection.Close();// Label1.Text myconnection.State.ToString();//}} } stylesheet2.css文件 body {background-color:azure; } #zhuce {width: 600px;height: 550px;border: 1px solid black;background-color: white;margin: 30px auto;text-align: center; } .txt1 {height: 30px;width: 270px; }这次的测试我觉得我完成的也是可以的首先通过配置参数将网页与数据库进行了相连然后使用一个label和两个button一个是打开数据库一个是关闭数据库来验证配置参数的正确性验证完成之后按照题目的要求设置相应的格式。 后面有时间的话再完善一下。
http://www.sczhlp.com/news/223248/

相关文章:

  • 南宁网站建设招聘产品包装设计网站
  • 阿坝县建设局网站设计师用的软件有哪些
  • 中国林业网站群建设工程中国施工企业协会官网
  • 郴州网站开发沈阳网站定制
  • 无锡新区建设局网站软件工程师证书有用吗
  • 永定区建设局网站龙岩优化公司
  • 成交型网站建设公司免费申请激活码
  • 510企业网站系统源码中小企业建站服务
  • 技术支持 合肥网站建设seo优化sem推广
  • 怎么做系统软件网站定制网站制作
  • 建网站的费用包括长沙网络推广平台
  • 科技公司企业网站建设怎么做网站建设的ppt
  • 番禺建设网站公司排名企业网站开发软件
  • wordpress怎么建立网站吗wordpress主题好的
  • 学网站建设基础做招聘网站
  • Liferay Portal与DXP集合提供程序存在授权缺失漏洞分析
  • MapGIS Objects Java计算一条三维线段与一个三角形所在的平面的交点 - 教程
  • layui时间与日期选择器,时间范围查询数据,后端springboot
  • 安徽网站建设调查报告用wordpress建立学校网站
  • 铁路建设工程网站网站开发工程师需要什么证书
  • 做视频点播网站要多少带宽东莞做网站定制
  • 盐城大丰网站建设找哪家好网站建设总计
  • 如何搞好网站建设app外包公司怎么找
  • 长安城乡建设开发有限公司网站制作的网站图片不显示
  • 网站建设捌金手指下拉十四北理工网站开发与应用答案
  • 教育学校网站做网站建设的隐私条款
  • windows2012做网站云服务器怎么上传网站
  • 深圳网站设计哪家强网站建设的需求要素
  • 油漆涂料网站建设北京网站seo策划
  • 上海网站优化排名网站优化链接