内蒙古信息工程系学实训报告系部:信息技术系课程名称:网站网页制作专业班级:14计算机网络技术一班姓名:xxx任课老师:xxx实验实训项目名称网站制作实验类型验证型实验室思科网络实验室实验时间[实验方案设计(步骤)]实验目的:熟练掌握SQL语句的编写。掌握使用VS2010对网页的设计。实验步骤:登录页面主要代码:protectedvoidButton1_Click(objectsender,EventArgse){stringusername=;stringpassword=;stringconnStr="server=(local);uid=sa;pwd=;database=StudentManager";SqlConnectionconn=newSqlConnection(connStr);mandcmd=mand("select*fromUserInfowhereusername='"+username+"'andpassword='"+password+"'",conn);();SqlDataReaderreader=();//记?录?集ˉif(()){("");}else{="用?户§名?或ò者?密ü码?错洙?误ó!?!?";}();}主页面+用户信息管理页面左侧主要运用了TreeView控件,然后用户信息运用了GridView控件,链接数据源,在页面中展示用户信息,主要代码:<asp:GridViewID="GridView1"runat="server"AllowPaging="True"AllowSorting="True"AutoGenerateColumns="False"DataKeyNames="Userid"DataSourceID="SqlDataSource1"style="font-family:楷?体?;font-size:medium"Width="550px"BackColor="#DEBA84"BorderColor="#DEBA84"BorderStyle="None"BorderWidth="1px"CellPadding="3"CellSpacing="2"><Columns><asp:BoundFieldDataField="Userid"HeaderText="序ò号?"ReadOnly="True"SortExpression="Userid"/><asp:BoundFieldDataField="UserName"HeaderText="用?户§名?"SortExpression="UserName"/><asp:BoundFieldDataField="Password"HeaderText="密ü码?"SortExpression="Password"/><asp:BoundFieldDataField="Email"HeaderText="电?子哩?邮?件t"SortExpression="Email"/><mandFieldShowDeleteButton="True"ShowEditButton="True"/></Columns><FooterStyleBackColor="#F7DFB5"ForeColor="#8C4510"/><HeaderStyleBackColor="#A55129"Font-Bold="True"ForeColor="White"/><PagerStyleForeColor="#8C4510"HorizontalAlign="Center"/><RowStyleBackColor="#FFF7E7"ForeColor="#8C4510"/><SelectedRowStyleBackColor="#738A9C"Font-Bold="True"ForeColor="White"/><SortedAscendingCellStyleBackColor="#FFF1D4"/><SortedAscendingHeaderStyleBackColor="#B95C30"/><SortedDescendingCellStyleBackColor="#F1E5CE"/><SortedDescendingHeaderStyleBackColor="#93451F"/></asp:GridView><br/><asp:SqlDataSourceID="SqlDataSource1"runat="server"ConnectionStri
学生管理系统(界面 源代码) 来自淘豆网m.daumloan.com转载请标明出处.