求助!!!连接数据库问题,在线等候,急!!!谢谢

lsq667 2006-10-31 06:54:17
dreamweaver 连接数据库后,预览提示insert into语句语法问题!代码如下:


<%@ Page Language="C#" ContentType="text/html" ResponseEncoding="gb2312" %>
<%@ Register TagPrefix="MM" Namespace="DreamweaverCtrls" Assembly="DreamweaverCtrls,version=1.0.0.0,publicKeyToken=836f606ede05d46a,culture=neutral" %>
<MM:Insert
runat="server"
CommandText='<%# "INSERT INTO tbMember (Confirmpassword, Email, Password, Username) VALUES (?, ?, ?, ?)" %>'
ConnectionString='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_STRING_Forumregister"] %>'
DatabaseType='<%# System.Configuration.ConfigurationSettings.AppSettings["MM_CONNECTION_DATABASETYPE_Forumregister"] %>'
Expression='<%# Request.Form["MM_insert"] == "form1" %>'
CreateDataSet="false"
SuccessURL='<%# "welcome.aspx" %>'
FailureURL='<%# "error.aspx" %>'
Debug="true"
>
<Parameters>
<Parameter Name="@Confirmpassword" Value='<%# ((Request.Form["Confirmpassword"] != null) && (Request.Form["Confirmpassword"].Length > 0)) ? Request.Form["Confirmpassword"] : "" %>' Type="WChar" />
<Parameter Name="@Email" Value='<%# ((Request.Form["Email"] != null) && (Request.Form["Email"].Length > 0)) ? Request.Form["Email"] : "" %>' Type="WChar" />
<Parameter Name="@Password" Value='<%# ((Request.Form["Password"] != null) && (Request.Form["Password"].Length > 0)) ? Request.Form["Password"] : "" %>' Type="WChar" />
<Parameter Name="@Username" Value='<%# ((Request.Form["Username"] != null) && (Request.Form["Username"].Length > 0)) ? Request.Form["Username"] : "" %>' Type="WChar" />
</Parameters>
</MM:Insert>
<MM:PageBind runat="server" PostBackBind="true" />

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=gb2312" />
<title>IsMyLife注册</title>
<style type="text/css">
<!--
body,td,th {
font-size: 12px;
color: #CCCC00;
}
body {
background-color: #282830;
}
a {
font-size: 12px;
color: #CCCC00;
}
a:link {
text-decoration: none;
}
a:visited {
text-decoration: none;
color: #CCFF00;
}
a:hover {
text-decoration: underline;
}
a:active {
text-decoration: none;
}
.STYLE1 {font-size: 13px}
-->
</style>
</head>
<body>
<table width="300" border="0" align="center" cellpadding="0" cellspacing="0">
<!--DWLayoutTable-->
<tr>
<td width="300" height="100"> </td>
</tr>
<tr>
<td height="250" valign="top"><table width="600" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td height="20" colspan="3"><img src="../image file/forum_register_frame_5.png" width="600" height="20" /></td>
</tr>
<tr>
<td width="20" height="210"><img src="../image file/forum_register_frame_3.png" width="20" height="210" /></td>
<td width="560" valign="top"><table width="260" border="0" cellspacing="0" cellpadding="0">
<!--DWLayoutTable-->
<tr>
<td width="260" height="28">             
  <span class="STYLE1">注册用户</span>
<div align="center" class="STYLE1"></div></td>
</tr>
<tr>
<td height="170" valign="top"><form runat='server' method='POST' name='form1' id="form1">
<table width="559" height="162" border="0" cellpadding="0" cellspacing="1" background="../image file/background_5.png" bgcolor="#282830">
<tr>
<td width="84" bgcolor="#282830">    Username:</td>
<td width="472" bgcolor="#282830"><input name="Username" type="text" id="Username" size="19" maxlength="20" runat="server" />
 
<asp:RequiredFieldValidator ControlToValidate="Username" EnableClientScript="true" ErrorMessage="对不起!您的用户名不能为空!" runat="server" /></td>
</tr>
<tr>
<td bgcolor="#282830">    Password:</td>
<td bgcolor="#282830"><input name="Password" type="password" id="Password" size="20" maxlength="20" runat="server" /></td>
</tr>
<tr>
<td bgcolor="#282830">    密码确认:</td>
<td bgcolor="#282830"><input name="Confirmpassword" type="password" id="Confirmpassword" size="20" maxlength="20" runat="server" />
 <asp:CompareValidator ControlToCompare="Password" ControlToValidate="Confirmpassword" EnableClientScript="true" ErrorMessage="对不起!您输入的确认密码与密码不相同!" Operator="Equal" runat="server" /></td>
</tr>
<tr>
<td bgcolor="#282830">       Email:</td>
<td bgcolor="#282830" runat="server"><input name="Email" type="text" id="Email" size="19" maxlength="20" runat="server" />
 
<asp:RegularExpressionValidator ControlToValidate="Email" Display="Static" EnableClientScript="true" ErrorMessage="对不起!您输入的Email格式不正确!" runat="server" ValidationExpression="\w+([-+.]\w+)*@\w+([-.]\w+)*\.\w+([-.]\w+)*" /></td>
</tr>
<tr>
<td colspan="2" bgcolor="#282830">                
<input name="Submit" type="submit" value="提交" runat="server" />
      </td>
</tr>
</table>
<input type="hidden" name="MM_insert" value="form1">
</form>
</td>
</tr>
</table>
</td>
<td width="20"><img src="../image file/forum_register_frame_4.png" width="20" height="210" /></td>
</tr>
<tr>
<td height="20" colspan="3"><img src="../image file/forum_register_frame_6.png" width="600" height="20" /></td>
</tr>
</table></td>
</tr>
</table>
</body>
</html>
...全文
140 3 打赏 收藏 转发到动态 举报
写回复
用AI写文章
3 条回复
切换为时间正序
请发表友善的回复…
发表回复
topfox0328 2006-10-31
  • 打赏
  • 举报
回复
这种提交方式是不需要 表单 的吗???好另类呀!!!
早起晚睡 2006-10-31
  • 打赏
  • 举报
回复
看不懂这是什么啊
liujia_0421 2006-10-31
  • 打赏
  • 举报
回复
没这么用过,看着也比较乱...
支持一下,也学习一下...

110,534

社区成员

发帖
与我相关
我的任务
社区描述
.NET技术 C#
社区管理员
  • C#
  • Web++
  • by_封爱
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告

让您成为最强悍的C#开发者

试试用AI创作助手写篇文章吧