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

做网站需要的带宽上行还是下行网站开发样板

做网站需要的带宽上行还是下行,网站开发样板,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.tj-hxxt.cn/news/233666.html

相关文章:

  • wordpress 建站五分钟国际知名设计公司有哪些
  • 安徽长江建设集团有限公司网站视频制作价格明细
  • 个人网站有什么用php网站数据库怎么上传
  • 网站设计师的工作内容美食网站案例
  • 网站建设基本费用慈溪哪里有做网站
  • 网站建设毕业答辩ppt模板下载如何搭建网络论坛平台
  • 内蒙古电子商务网站做行业网站投入
  • 网做 网站有哪些辽宁省工程招投标信息网
  • 四川建设厅官方网站证书查询泰州市网站建设制作
  • 政务公开网站建设管理网站建设带后台
  • 营口 微网站建设wordpress怎么查看域名绑定
  • 广州网站建设 易点宠物医院网站开发
  • wordpress 下载站主题建设银行网上流览网站
  • 网站子目录绑定二级域名网页设计个人
  • 17网站一起做网店打不开做那种网站
  • 如何统计网站pv买了个网站后怎么做的
  • 网站seo策划wordpress页脚设计
  • 网站管理平台扩展插件建设网站需要多少费用
  • 天河区门户网站教育专栏茶百道加盟费大概要多少
  • 博湖网站建设丽水网站建设明恩玉杰
  • 美食网站建设书创新作品及其设计方案
  • fedora做网站服务器营销网络遍布全国
  • 公司网站百度搜索的描述怎么做做网站一般需要多久
  • 网站开发 php模板做网站有2个前提条件 一个是网站
  • 网站开发得多长时间wordpress 什么是插件吗
  • wordpress 视频站网站客户端怎么做的
  • 设计师网站库dw做了网站还可以做淘宝详情吗
  • 网站开发实验报告总结手机视频网站怎么做
  • 网站开发朋友圈广告免费网页空间
  • 网站建设关键字优化免费建站系统软件