Forums
This topic is locked
passing values
Posted 16 Mar 2007 22:06:35
1
has voted
16 Mar 2007 22:06:35 Javier Castro posted:
Help please. My situation:page 1:
A list:
Newsletter Issue#1 ---Let say the value is 9---
passes ID value using link:
<a href="nl_newsletter_preview.asp?id=<%=(rsNewIssue.Fields.Item("intIssueID".Value)>">Preview</a>
page 2:
Display Layout for Newsletter Issue#1
On this page there is a list for Articles that would take you to see each article within the layout of the page.
Article 1 link:
<li>
<a href="nl_newsletter_preview.asp?id=<%=(rsNewsletter.Fields.Item("intNewsletterID".Value)%>"><%=(rsSections.Fields.Item("txtSectionName".Value)%></a>
</li>
The problem I have is that i do not have the ID value ---9 -- of the previous page.
Question:
How can I hold that previous ID Value of 9 and add it to the link for each article?????
Any ideas, or suggestions.
Javier
Replies
Replied 18 Mar 2007 23:26:10
18 Mar 2007 23:26:10 Lee Diggins replied:
Hi Javier
You're sending the value through the querystring so retrieve it using Request.QueryString("id". Assign the value a variable then append the value to the new querystring.
Dim passedID
passedID = Request.Querystring("id"
The problem you've got here at the moment is that you are using id as the name of the value being passed in both querystrings to represent intIssueID and intNewsletterID. If this wasn't the case you could use Request.ServerVariables("QUERY_STRING" and append that to your new querystring.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
You're sending the value through the querystring so retrieve it using Request.QueryString("id". Assign the value a variable then append the value to the new querystring.
Dim passedID
passedID = Request.Querystring("id"
The problem you've got here at the moment is that you are using id as the name of the value being passed in both querystrings to represent intIssueID and intNewsletterID. If this wasn't the case you could use Request.ServerVariables("QUERY_STRING" and append that to your new querystring.
Sharing Knowledge Saves Valuable Time!!!
~ ~ ~ ~ ~ ~
<b>Lee Diggins</b> - <i>DMXzone Manager</i>
<font size="1">[ Studio MX/MX2004 | ASP -> VBScript/PerlScript/JavaScript | SQL | CSS ]</font>
Replied 19 Mar 2007 03:24:34
19 Mar 2007 03:24:34 Javier Castro replied:
Thanks Lee. It took me a while but finally I did it. Your suggestion made my hampster spin the wheel again and worked.
I modified your
Dim passedID
passedID = Request.Querystring("id" to ("issue"
then I changed my recordsets to reflect the change from id to issue. finally On my link to display the articles I used
issue <%=(rsIssueNumber.Fields.Item("intIssueID".Value)%>
and
id <%=(rsSections.Fields.Item("intNewsletterID".Value)%>
and worked like a charm.
Thanks again Lee.
I modified your
Dim passedID
passedID = Request.Querystring("id" to ("issue"
then I changed my recordsets to reflect the change from id to issue. finally On my link to display the articles I used
issue <%=(rsIssueNumber.Fields.Item("intIssueID".Value)%>
and
id <%=(rsSections.Fields.Item("intNewsletterID".Value)%>
and worked like a charm.
Thanks again Lee.