web开发练习题
的标准方法
11. Web Service的基本特点是什么?
1.是可复用的web应用程序组件 2.与平台无关的 3.自说明,自描述的
4.使用统一的机制在互联网查找
五.编程题
1. 写一个登录注册页面.aspx程序,可以输入用户名和口令。
(1)点击“登录”按钮,读取从客户端传来的用户名和口令,并判断输入的用户名和口令是否正确(假定数据库为test,用户信息表为users),若正确则进入一个欢迎页面(假设为welcome.aspx),否则提示出错信息。
(2)点击“注册”按钮,进入用户信息注册页面,输入用户信息,注意必要的地方有验证控件(至少两个),点击“添加”按钮,将信息写入数据库,并提示写入成功。
2. 通过http://www.77cn.com.cn连接数据库test,并执行一个select * from users查询,将结果通过GridView控件显示出来。登录页面
<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="_Default" Debug="true" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.77cn.com.cn/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.77cn.com.cn/1999/xhtml"> <head runat="server"> <title></title> </head> <body>
<form id="form1" action="" method="post" runat="server">
<asp:Label ID="Label1" runat="server" Text="用户名:"></asp:Label> <asp:Label ID="Label2" runat="server" Text="密码:"></asp:Label> <asp:TextBox ID="password" runat="server" name="password"
<asp:Button ID="Button1" runat="server" Text="登录" OnClick="Button1_Click" />
<asp:TextBox ID="username" runat="server" name="username"></asp:TextBox>
TextMode="Password"></asp:TextBox>
<asp:Button ID="Button2" runat="server" Text="注册" OnClick="Button2_Click" /> </form> </body> </html>