Forum Moderators: open

Message Too Old, No Replies

Dynamic Link Help

         

fiu88

3:29 am on Jun 3, 2005 (gmt 0)

10+ Year Member



I'm trying to create a dynamic link to open a related external page based on the product ID shown on the current page...
I.e. current product ID is 1245, I need a link on that page to open an exterior page installationinstructions1245.pdf
The link is always the same except for changing the product# based on the dyn. page showing...

Can anyone help?
Am I even explaining this properly?

Help---!

Jimmy Turnip

9:58 am on Jun 3, 2005 (gmt 0)

10+ Year Member



Are you using a querystring? Because if you are you can just do:

<a href="installationinstructions<% Response.Write(Request.Querystring("id")) %>.pdf">installationinstructions<% Response.Write(Request.Querystring("id")) %>.pdf </a>

Where id = name of product id variable in querystring

Balloon

5:11 pm on Jun 6, 2005 (gmt 0)

10+ Year Member



You should probably create an asp HyperLink object...

<asp:HyperLink id="MyLink" runat="Server">Click Me</asp:HyperLink>

... then in your code you can set the URL it should go to like this...

MyLink.NavigateURL = "installationinstructions" & ID & ".pdf"

... hope that makes sense!

- Chris

fiu88

4:49 am on Jun 7, 2005 (gmt 0)

10+ Year Member



Excuse my ignorance..I note that I have this line of code..would this be my query string?

txtProdId = Request.QueryString("product_id")

The files I want to link to are external ...

Can I just insert <%=rsProdID("ProdID")%> into the link?

i.e http:www.sourcesite/installationinstructions<%=rsProdID("ProdID")%>.pdf ?

The ASP object sems a bit over my head! but maybe simpler than I think it is....

Again , I need to link to external files ...

Balloon

10:06 am on Jun 7, 2005 (gmt 0)

10+ Year Member



This would be more likely...

[sourcesite...]

... but it's hard to tell without seeing the whole thing.

Good luck!
- Chris

fiu88

2:14 pm on Jun 7, 2005 (gmt 0)

10+ Year Member



Balloon...works like a charm!

Thank you very much!