Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
    Dedicated community for Japanese speakers
  • 한국 커뮤니티
    Dedicated community for Korean speakers
0

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

Explorer ,
Apr 02, 2007 Apr 02, 2007

Copy link to clipboard

Copied

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

TOPICS
Server side applications

Views

575
Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 02, 2007 Apr 02, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 02, 2007 Apr 02, 2007

Copy link to clipboard

Copied

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

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
LEGEND ,
Apr 02, 2007 Apr 02, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Contributor ,
Apr 02, 2007 Apr 02, 2007

Copy link to clipboard

Copied

It doesn't matter if your link is in a repeat region, it will still work.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2007 Apr 03, 2007

Copy link to clipboard

Copied

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.

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Apr 03, 2007 Apr 03, 2007

Copy link to clipboard

Copied

LATEST
Thanks Tim P

Votes

Translate

Report

Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines