首页
老网站
正文
简易ASP+注册系统
{$ad$}
<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<html>
<head><title>ASP+注册</title>
<link rel="stylesheet" type="text/css" href="main.css">
<Script Language="C#" RunAt=Server>
void btnSubmit_Click(Object Src,EventArgs E)
{
if(Page.IsValid)
{
String strSQL;
strSQL="INSERT INTO tblUserInfo VALUES(@UserName,@PassWord,@Email)";
SQLConnection cnn=new SQLConnection("Server=niu;UID=sa;PWD=;DataBase=aspx");
SQLCommand cmm=new SQLCommand(strSQL,cnn);
cmm.Parameters.Add(new SQLParameter("@UserName",SQLDataType.VarChar,20));
cmm.Parameters["@UserName"].Value=txtName.Text;
cmm.Parameters.Add(new SQLParameter("@PassWord",SQLDataType.VarChar,20));
cmm.Parameters["@PassWord"].Value=txtName.Text;
cmm.Parameters.Add(new SQLParameter("@Email",SQLDataType.VarChar,60));
cmm.Parameters["@Email"].Value=txtName.Text;
cmm.ActiveConnection.Open();
try
{
cmm.Execute();
cmm.ActiveConnection.Close();
Page.Navigate("result.aspx");
}
catch
{
lblMsg.Style["color"]="red";
lblMsg.Text="插入数据出错";
}
}
}
</Script>
</head>
<body>
<h2 align="center">ASP+注册系统</h2>
<ASP:Label ID="lblMsg" RunAt=Server/>
<form RunAt=Server>
<table bgcolor="#eeeeee" cellpadding="10" align="center">
<tr>
<td>姓名:</td>
<td>
<ASP:TextBox ID="txtName" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvName"
ControlToValidate="txtName"
Display="Dynamic"
InitalValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<ASP:TextBox ID="txtPassWord" TextMode="PassWord" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvPassWord"
ControlToValidate="txtPassWord"
Display="Dynamic"
InitialValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>确认密码:</td>
<td>
<ASP:TextBox ID="txtRePassWord" TextMode="PassWord" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvRePassWord"
ControlToValidate="txtRePassWord"
Display="Dynamic"
InitialValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
<ASP:CompareValidator ID="cvRePassWord"
ControlToValidate="txtRePassWord" ControlToCompare="txtPassWord"
Display="Dynamic"
ErrorMessage="密码确认错,请注意字母大小写!"
Runat=Server>
</ASP:CompareValidator>
</td>
</tr>
<tr>
<td>电子邮件:</td>
<td>
<ASP:TextBox ID="txtEmail" MaxLength="60" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rvfEmail"
ControlToValidate="txtEmail"
InitialValue=""
Display="Dynamic"
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
<ASP:RegularExpressionValidator ID="revEmail"
ControlToValidate="txtEmail"
Display="Dynamic"
ErrorMessage="无效电子邮件地址!"
ValidationExpression="^[\w-]+@[\w-]+\.(com|net|org|edu|mil)$"
RunAt=Server>
</ASP:RegularExpressionValidator>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<ASP:Button ID="btnSubmit" OnClick="btnSubmit_Click" Text="提交" Class="mybtn" RunAt=Server/>
</td>
</tr>
</table>
</form>
</body>
</html>
SELECT [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name]
FROM [dbo].[mvc_content_view] AS [t0]
WHERE ([t0].[a_id] = @p0) AND ([t0].[a_type] = @p1)
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1
SELECT TOP (1) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name]
FROM [dbo].[mvc_content_view] AS [t0]
WHERE ([t0].[a_type] = @p0) AND ([t0].[a_id] < @p1)
ORDER BY [t0].[a_id] DESC
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1
SELECT TOP (1) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name]
FROM [dbo].[mvc_content_view] AS [t0]
WHERE ([t0].[a_type] = @p0) AND ([t0].[a_id] > @p1)
ORDER BY [t0].[a_id]
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1
SELECT [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo]
FROM [dbo].[mvc_content] AS [t0]
WHERE ([t0].[a_id] = @p0) AND ([t0].[a_type] = @p1)
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1
UPDATE [dbo].[mvc_content]
SET [a_hits] = @p19
WHERE ([a_id] = @p0) AND ([a_site] = @p1) AND ([a_model] = @p2) AND ([a_type] = @p3) AND ([a_special] = @p4) AND ([a_name] = @p5) AND ([a_from] = @p6) AND ([a_from_url] IS NULL) AND ([a_author] IS NULL) AND ([a_editor] IS NULL) AND ([a_describe] IS NULL) AND ([a_content] = @p7) AND ([a_create_date] = @p8) AND ([a_tag] = @p9) AND ([a_hits] = @p10) AND (NOT ([a_commend] = 1)) AND (NOT ([a_istop] = 1)) AND (NOT ([a_isimg] = 1)) AND ([a_cacheimg] IS NULL) AND ([a_imgurls] IS NULL) AND ([a_imgurl] = @p11) AND (NOT ([a_ismedia] = 1)) AND ([a_mediaurl] IS NULL) AND (NOT ([a_iscomment] = 1)) AND (NOT ([a_isRecycle] = 1)) AND ([a_weight] = @p12) AND ([a_status] = @p13) AND ([a_url] IS NULL) AND ([a_file_path] IS NULL) AND ([a_contentfile] IS NULL) AND ([a_comment] = @p14) AND ([a_ispass] = @p15) AND ([a_bury] = @p16) AND ([a_dig] = @p17) AND ([a_score] = @p18) AND ([a_diguser] IS NULL) AND ([a_buryuser] IS NULL) AND ([a_viewip] IS NULL) AND ([a_lastviewdate] IS NULL) AND ([a_neworimageorvideo] IS NULL)
SELECT [t1].[a_weights], [t1].[a_rank]
FROM [dbo].[mvc_content] AS [t1]
WHERE ((@@ROWCOUNT) > 0) AND ([t1].[a_id] = @p20)
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- @p1: Input BigInt (Size = 0; Prec = 0; Scale = 0) [197]
-- @p2: Input BigInt (Size = 0; Prec = 0; Scale = 0) [24]
-- @p3: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- @p4: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p5: Input NVarChar (Size = 10; Prec = 0; Scale = 0) [简易ASP+注册系统]
-- @p6: Input NVarChar (Size = 4; Prec = 0; Scale = 0) [1257]
-- @p7: Input NVarChar (Size = 8045; Prec = 0; Scale = 0) [{$ad$}<%@ Page Language="C#" %>
<%@ Import Namespace="System.Data" %>
<%@ Import Namespace="System.Data.SQL" %>
<html>
<head><title>ASP+注册</title>
<link rel="stylesheet" type="text/css" href="main.css">
<Script Language="C#" RunAt=Server>
void btnSubmit_Click(Object Src,EventArgs E)
{
if(Page.IsValid)
{
String strSQL;
strSQL="INSERT INTO tblUserInfo VALUES(@UserName,@PassWord,@Email)";
SQLConnection cnn=new SQLConnection("Server=niu;UID=sa;PWD=;DataBase=aspx");
SQLCommand cmm=new SQLCommand(strSQL,cnn);
cmm.Parameters.Add(new SQLParameter("@UserName",SQLDataType.VarChar,20));
cmm.Parameters["@UserName"].Value=txtName.Text;
cmm.Parameters.Add(new SQLParameter("@PassWord",SQLDataType.VarChar,20));
cmm.Parameters["@PassWord"].Value=txtName.Text;
cmm.Parameters.Add(new SQLParameter("@Email",SQLDataType.VarChar,60));
cmm.Parameters["@Email"].Value=txtName.Text;
cmm.ActiveConnection.Open();
try
{
cmm.Execute();
cmm.ActiveConnection.Close();
Page.Navigate("result.aspx");
}
catch
{
lblMsg.Style["color"]="red";
lblMsg.Text="插入数据出错";
}
}
}
</Script>
</head>
<body>
<h2 align="center">ASP+注册系统</h2>
<ASP:Label ID="lblMsg" RunAt=Server/>
<form RunAt=Server>
<table bgcolor="#eeeeee" cellpadding="10" align="center">
<tr>
<td>姓名:</td>
<td>
<ASP:TextBox ID="txtName" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvName"
ControlToValidate="txtName"
Display="Dynamic"
InitalValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>密码:</td>
<td>
<ASP:TextBox ID="txtPassWord" TextMode="PassWord" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvPassWord"
ControlToValidate="txtPassWord"
Display="Dynamic"
InitialValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
</td>
</tr>
<tr>
<td>确认密码:</td>
<td>
<ASP:TextBox ID="txtRePassWord" TextMode="PassWord" MaxLength="20" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rfvRePassWord"
ControlToValidate="txtRePassWord"
Display="Dynamic"
InitialValue=""
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
<ASP:CompareValidator ID="cvRePassWord"
ControlToValidate="txtRePassWord" ControlToCompare="txtPassWord"
Display="Dynamic"
ErrorMessage="密码确认错,请注意字母大小写!"
Runat=Server>
</ASP:CompareValidator>
</td>
</tr>
<tr>
<td>电子邮件:</td>
<td>
<ASP:TextBox ID="txtEmail" MaxLength="60" Class="mytext" RunAt=Server/>
</td>
<td>
<ASP:RequiredFieldValidator ID="rvfEmail"
ControlToValidate="txtEmail"
InitialValue=""
Display="Dynamic"
ErrorMessage="*"
RunAt=Server>
</ASP:RequiredFieldValidator>
<ASP:RegularExpressionValidator ID="revEmail"
ControlToValidate="txtEmail"
Display="Dynamic"
ErrorMessage="无效电子邮件地址!"
ValidationExpression="^[\w-]+@[\w-]+\.(com|net|org|edu|mil)$"
RunAt=Server>
</ASP:RegularExpressionValidator>
</td>
</tr>
<tr>
<td colspan="3" align="center">
<ASP:Button ID="btnSubmit" OnClick="btnSubmit_Click" Text="提交" Class="mybtn" RunAt=Server/>
</td>
</tr>
</table>
</form>
</body>
</html>
]
-- @p8: Input DateTime (Size = 0; Prec = 0; Scale = 0) [2007-12-28 22:03:05]
-- @p9: Input NVarChar (Size = 12; Prec = 0; Scale = 0) [简易,ASP,注册,系统]
-- @p10: Input BigInt (Size = 0; Prec = 0; Scale = 0) [1495]
-- @p11: Input NVarChar (Size = 0; Prec = 0; Scale = 0) []
-- @p12: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p13: Input Int (Size = 0; Prec = 0; Scale = 0) [0]
-- @p14: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p15: Input Int (Size = 0; Prec = 0; Scale = 0) [0]
-- @p16: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p17: Input BigInt (Size = 0; Prec = 0; Scale = 0) [0]
-- @p18: Input Float (Size = 0; Prec = 0; Scale = 0) [0]
-- @p19: Input BigInt (Size = 0; Prec = 0; Scale = 0) [1496]
-- @p20: Input BigInt (Size = 0; Prec = 0; Scale = 0) [4271]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1
SELECT TOP (10) [t0].[a_id], [t0].[a_site], [t0].[a_model], [t0].[a_type], [t0].[a_special], [t0].[a_name], [t0].[a_from], [t0].[a_from_url], [t0].[a_author], [t0].[a_editor], [t0].[a_describe], [t0].[a_content], [t0].[a_create_date], [t0].[a_tag], [t0].[a_hits], [t0].[a_commend], [t0].[a_istop], [t0].[a_isimg], [t0].[a_cacheimg], [t0].[a_imgurls], [t0].[a_imgurl], [t0].[a_ismedia], [t0].[a_mediaurl], [t0].[a_iscomment], [t0].[a_isRecycle], [t0].[a_weight], [t0].[a_weights], [t0].[a_status], [t0].[a_url], [t0].[a_file_path], [t0].[a_contentfile], [t0].[a_comment], [t0].[a_ispass], [t0].[a_bury], [t0].[a_dig], [t0].[a_score], [t0].[a_rank], [t0].[a_diguser], [t0].[a_buryuser], [t0].[a_viewip], [t0].[a_lastviewdate], [t0].[a_neworimageorvideo], [t0].[class_id], [t0].[class_type], [t0].[class_name], [t0].[class_show_name], [t0].[class_parent_id], [t0].[class_id_path], [t0].[class_name_path], [t0].[class_show_name_path], [t0].[class_depth], [t0].[class_order], [t0].[class_content], [t0].[class_img], [t0].[a_model_name]
FROM [dbo].[mvc_content_view] AS [t0]
WHERE ([t0].[a_type] IN (@p0)) AND (NOT ([t0].[a_isRecycle] = 1))
ORDER BY [t0].[a_id] DESC
-- @p0: Input BigInt (Size = 0; Prec = 0; Scale = 0) [236]
-- Context: SqlProvider(Sql2008) Model: AttributedMetaModel Build: 3.5.30729.1