本文介绍了传递价值问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述 我将页面中的值传递到另一页 页面时遇到一些困难。我将提供代码的摘录。我想我很接近。 这是来自Page1.ASP <% Set Conn = Server.CreateObject(" ADODB.Connection") DSNtest =" DRIVER = {Microsoft Access Driver(* .mdb)}; DSNtest = dsntest& " DBQ = QUOT; &安培; Server.MapPath(" ncci.mdb") Conn.Open DSNtest 设置rs = Server.CreateObject(" ADODB.Recordset") strSQL =" SELECT Distinct Insured FROM CCI2" rs.Open strSQL,conn,3 %> < TABLE> < tr> < td width = 200> < select onchange =" parent.fSearch1.location.href =''Search1.a sp?Ins =''+ this.value;" size =" 1"> 选择内容后,将INS值传递给Page 2.ASP(代码 未显示) 这是来自Page 2.ASP insName = Request.QueryString(" Ins") > 功能sIn(s) sIn ="''" &安培;替换(s,,,和&; "''" 结束函数 设置Conn = Server.CreateObject(" ADODB.Connection") DSNtest =" DRIVER = {Microsoft Access Driver(* .mdb)}; DSNtest = dsntest& " DBQ = QUOT; &安培; Server.MapPath(" cci.mdb") Conn.Open DSNtest 设置rs = Server.CreateObject(" ADODB.Recordset") strSQL =" SELECT Distinct State FROM CCI2,其中Insured =" &安培; sIn(insName)& ";" rs.Open strSQL,conn,3,3 到目前为止应该可以正常工作。 我正在尝试将insName传递给Page 3.ASP 我已经在我的表单中尝试了这个。 /> <% response.write"< input type = hidden name = insName value =''" &安培; insName& "''>" %> 这是来自Page 3.ASP insName = Request.form(" insName") 然后我只是尝试使用下面的代码显示它并且它没有看到 它。 response.write(insName) 请帮忙。 解决方案 "''>" 没有看到 it。 response.write(insName) I am having a little difficulty in passing a value from a page to anotherpage. I am going to provide excerpts from the code. I think I am close. This is from Page1.ASP <%Set Conn = Server.CreateObject("ADODB.Connection")DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "DSNtest=dsntest & "DBQ=" & Server.MapPath("ncci.mdb")Conn.Open DSNtest Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT Distinct Insured FROM CCI2"rs.Open strSQL, conn, 3, 3%> <TABLE> <tr><td width=200><selectonchange="parent.fSearch1.location.href=''Search1.a sp?Ins=''+this.value;"size="1"> This passes the INS value to Page 2.ASP after something is selected (codenot shown) This is from Page 2.ASP insName = Request.QueryString("Ins") Function sIn(s)sIn = "''" & Replace(s, "''", "''''") & "''"End Function Set Conn = Server.CreateObject("ADODB.Connection")DSNtest="DRIVER={Microsoft Access Driver (*.mdb)}; "DSNtest=dsntest & "DBQ=" & Server.MapPath("cci.mdb")Conn.Open DSNtest Set rs = Server.CreateObject("ADODB.Recordset") strSQL = "SELECT Distinct State FROM CCI2 where Insured = " & sIn(insName) &";"rs.Open strSQL, conn, 3, 3 This works as it should up to this point. I am trying to pass insName to Page 3.ASPI have tried this inside my form. <%response.write"<input type=hidden name=insName value=''" & insName & "''>"%> This is from Page 3.ASP insName = Request.form("insName") Then I am just trying to display it using the below code and it doesn''t seeit. response.write(insName)Please help. 解决方案 "''>" doesn''t see 这篇关于传递价值问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!
10-23 20:24