Skip to main content
Known Participant
April 2, 2007
質問

Passing two variables in the body of the URL using the go to detail page SB in ASP

  • April 2, 2007
  • 返信数 5.
  • 645 ビュー
Hi all,

Would appreciate your assistance with the following, I'm trying to set up a go to detail page sb that passes two variable in the body of the URL rather than the standard one.

The code i've tried is -

<td><A HREF="gggggggtest.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "PCL2ID=" + othermenutwo.Fields.Item("PCL2ID").Value %>&"PCL1ID=" + othermenutwo.Fields.Item("PCL2PC1ID").Value %><%=(othermenutwo.Fields.Item("PCL2Description").Value)%></A></td>

Where the PCL1ID and the PCL2ID are the variables

The normal code generated by the go to detail page sb with one variable is -

<td><a href="ggggggtest.asp?<%= Server.HTMLEncode(MM_keepNone) + ((MM_keepNone!="")?"&":"") + "PCL2ID=" + othermenutwo.Fields.Item("PCL2ID").Value %>"><%=(othermenutwo.Fields.Item("PCL2Description").Value)%></a></td>

Unfortunatley my code tweaking isn't working as the second variable isn't being sent, any help would be gratefully appreciated

Thanks

このトピックへの返信は締め切られました。

返信数 5

GTN1707作成者
Known Participant
April 3, 2007
Thanks Tim P
Inspiring
April 3, 2007
It doesn't matter if your link is in a repeat region, it will still work.
Inspiring
April 3, 2007
Instead of using DW's 'go to detail page' option, simply set up the link the manual way in DW using the Link browser. Select the file you want to link to and then use the parameters button at the bottom of the 'Select File' dialogue to set the parameters to be passed with the link. You can then manually set the name of the parameter to be passed and then select its value from a recordset. The key thing is that you can set as many parameters as you like, so you can set both the parameters you want.

On the detail page you then filter by the parameter name you chose (or both).

Personally I always code links this way rather than using the go to detail page option as you get much better control of what is going on.
Inspiring
April 2, 2007
Still, I agree with envision3d. Learn to hand code it. It may be a
little tuff at first but in the long run you will find many uses. I
start with dw generated one var and then mod that code.
GTN1707作成者
Known Participant
April 2, 2007
Sorry I forgot to add that the link is part of a repeated region and that the recordsets will contain multiple records, thus i'm using the Go to Detail page SB

Thanks
Inspiring
April 2, 2007
Just hard code it.
<a href="link.asp?PCL1ID=<%rs.fields.item("PCL1ID").value%>&PCL2ID=<%rs.fields.item("PCL2ID").value%>> Link </a>