newmember.aspx
来自「用VB实现」· ASPX 代码 · 共 169 行
ASPX
169 行
<%@ Page Language="VB" ContentType="text/html" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:DataSet
id="dsID"
runat="Server"
IsStoredProcedure="false"
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
CommandText='<%# "SELECT ID FROM Member WHERE ID = ? Or eMail = ?" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@ID" Value='<%# theID.Text %>' Type="WChar" />
<Parameter Name="@eMail" Value='<%# eMail.Text %>' Type="WChar" />
</Parameters>
</MM:DataSet>
<MM:PageBind runat="server" PostBackBind="true" />
<MM:If runat="server" Expression='<%# (dsID.RecordCount = 0) %>'>
<ContentsTemplate>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO Member (Address, Birthday, city, eMail, Fax, ID, Name, Phone, Pws, Sex) VALUES (?, ?, ?, ?, ?, ?, ?, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_STRING_conn") %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings("MM_CONNECTION_DATABASETYPE_conn") %>'
Expression='<%# Request.Form("MM_insert") = "form1" %>'
CreateDataSet="false"
SuccessURL='<%# "LogIn.aspx" %>'
Debug="true"
><Parameters>
<Parameter Name="@Address" Value='<%# IIf((Request.Form("Address") <> Nothing), Request.Form("Address"), "") %>' Type="WChar" />
<Parameter Name="@Birthday" Value='<%# IIf((Request.Form("Birthday") <> Nothing), Request.Form("Birthday"), "") %>' Type="Date" />
<Parameter Name="@city" Value='<%# IIf((Request.Form("city") <> Nothing), Request.Form("city"), "") %>' Type="WChar" />
<Parameter Name="@eMail" Value='<%# IIf((Request.Form("eMail") <> Nothing), Request.Form("eMail"), "") %>' Type="WChar" />
<Parameter Name="@Fax" Value='<%# IIf((Request.Form("Fax") <> Nothing), Request.Form("Fax"), "") %>' Type="WChar" />
<Parameter Name="@ID" Value='<%# IIf((Request.Form("theID") <> Nothing), Request.Form("theID"), "") %>' Type="WChar" />
<Parameter Name="@Name" Value='<%# IIf((Request.Form("Name") <> Nothing), Request.Form("Name"), "") %>' Type="WChar" />
<Parameter Name="@Phone" Value='<%# IIf((Request.Form("Phone") <> Nothing), Request.Form("Phone"), "") %>' Type="WChar" />
<Parameter Name="@Pws" Value='<%# IIf((Request.Form("Pws") <> Nothing), Request.Form("Pws"), "") %>' Type="WChar" />
<Parameter Name="@Sex" Value='<%# IIf((Request.Form("Sex") <> Nothing), Request.Form("Sex"), "") %>' Type="Boolean" />
</Parameters>
</MM:Insert>
</ContentsTemplate>
</MM:If>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312">
<title>注册会员</title>
<style type="text/css">
<!--
.style1 {
font-size: xx-large;
font-weight: bold;
}
.style4 {color: #FF0000}
-->
</style>
</head>
<body>
<form method="post" name="form1" runat="server">
<div align="center">
<table width="633" border="0">
<tr>
<td colspan="2"><div align="center" class="style1">新会员注册
<hr>
</div></td>
</tr>
<tr>
<td width="262"><div align="right">用户名</div></td>
<td width="361">
<div align="left">
<asp:TextBox ID="theID" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">姓名</div></td>
<td>
<div align="left">
<asp:textbox id="Name" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">密码</div></td>
<td>
<div align="left">
<asp:textbox id="Pws" TextMode="Password" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">生日</div></td>
<td>
<div align="left">
<asp:textbox id="Birthday" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">电子邮件</div></td>
<td>
<div align="left">
<asp:textbox id="eMail" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">传真</div></td>
<td>
<div align="left">
<asp:textbox id="Fax" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">联系电话</div></td>
<td>
<div align="left">
<asp:textbox id="Phone" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td><div align="right">男性(选中)/女性(不选)</div></td>
<td>
<div align="left">
<asp:checkbox id="Sex" runat="server" checked='false' />
</div></td>
</tr>
<tr>
<td><div align="right">住址</div></td>
<td>
<div align="left">
<asp:textbox id="city" TextMode="SingleLine" Columns="32" runat="server" />
</div></td>
</tr>
<tr>
<td> </td>
<td>
<div align="left">
<asp:TextBox ID="Address" TextMode="SingleLine" Columns="60" runat="server" />
</div></td>
</tr>
<tr>
<td> </td>
<td>
<div align="left">
<asp:Button ID="btnReg" runat="server" Text="确认" />
</div></td>
</tr>
<tr>
<td> </td>
<td> </td>
</tr>
<MM:If runat="server" Expression='<%# (dsID.RecordCount > 0) %>'>
<ContentsTemplate>
<tr>
<td> </td>
<td>
<div align="left" class="style4">用户名或电子邮件已经存在,请重新输入!
</div></td>
</tr>
</ContentsTemplate>
</MM:If>
</table>
</div>
<input type="hidden" name="MM_insert" value="form1">
</form>
<p align="center"> </p>
</body>
</html>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?