Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

The value can not be passed into ASP page

Status
Not open for further replies.

longmatch

Programmer
Nov 1, 2001
406
Dear All:
I would like to pass the value into an ASP page, for querying. But the value can not pass. I would like to know why. My code is:

Do While Not rsSummary.EOF
Response.Write _
&quot;<TR ALIGN=CENTER>&quot; & _
&quot; <TD>&quot; & &quot;<a href='ProcedureDetails.asp?Details='&quot; & rsSummary(&quot;category&quot;) & &quot;>&quot; & rsSummary(&quot;category&quot;) & &quot;</a>&quot; & &quot;</TD>&quot; & _
&quot; <TD>&quot; & rsSummary(&quot;NoProcedure&quot;) & &quot;</TD>&quot; & _
&quot;</TR>&quot;
rsSummary.MoveNext
Loop

When I used following code to retrieve the value, The &quot;details&quot; variable is empty. Please show me why it did not work.

details = trim(request(&quot;Details&quot;))
Response.Write (Details)

HAIJUN
 
Move your single quote &quot;'&quot; from Details=' to &quot;'>&quot;. Should solve your problem.

Response.Write _
&quot;<TR ALIGN=CENTER>&quot; & _
&quot; <TD>&quot; & &quot;<a href='ProcedureDetails.asp?Details=&quot; & rsSummary(&quot;category&quot;) & &quot;'>&quot; & rsSummary(&quot;category&quot;) & &quot;</a>&quot; & &quot;</TD>&quot; & _
&quot; <TD>&quot; & rsSummary(&quot;NoProcedure&quot;) & &quot;</TD>&quot; & _
&quot;</TR>&quot;


Choo Khor
choo.khor@intelebill.com
 
Thank you very much. It works right now. Could you tell me what is wrong with my coding? I always have trouble using quote or double quote.

Haijun
 
The problem here is that you've ended the value for the href element of the <a> tag before completing the URL.

The resulting HTML would be:
<a href='ProcedureDetails.asp?Details='MyCategory>MyCategory</a>

whereas your code should be this:
<a href='ProcedureDetails.asp?Details=MyCategory'>MyCategory</a>

It is easier to debug by printing out the result, and comparing it to your expected outcome.

Choo Khor
choo.khor@intelebill.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top