我有一个输入字段,其值来自变量,当我将表单记录插入作为空行提交时:(
如果我检查页面的视图源,它会清楚地打印该值但不插入它。
这是输入字段:
<input name="uid" type="text" value="<%Response.Write(studentid)%>" disabled="disabled" />
这是插入代码:
<%
if request.Form("MyRecord")="Insert" then
Set InsCom=Server.CreateObject("ADODB.Command")
InsCom.ActiveConnection=objConn
InsF = Trim(request.Form("uid"))
InsF = replace(InsF,"'","''")
InsCom.CommandText = "Insert into talent_hunt(uid)Values(?) "
InsCom.Parameters.Append InsCom.CreateParameter("@uid", adVarChar, adParamInput, 255, InsF)
InsCom.Execute
response.Write"Record Inserted Successfully!<br /><a href=""talent-hunt.asp"" />Go Back to main page</a>"
end if
%>
请帮忙...