How do I pass a value in a Hyperlink?

J

JDP@Work

I want to pass a SRS report name from the reports page that has a hyperlink for
each SRS report in the Sales folder.

So far I have the following....

Reports.aspx
<html>
.....omitted code
<a onfocus="this.blur()"
onclick="NewWindow(this.href,'ReportOptions','400','400','no','center');return
false"
href="./reports/RptOptions.aspx?Report=SalesbyRegion">Sales By Region</a>


As long as I hard code my report name in the RptOptions page I can render my
report, however I'd like the value SalesbyRegion to actually be the report that
is rendered.


RptOptions.vb
...... omitted code
Dim rptOpts as New Common.ReportSetup
rptOpts.ReportPath = "/Sales/SalesbyRegion"


I think that I want something more like....


RptOptions.vb
...... omitted code
Dim rptOpts as New Common.ReportSetup
Dim rptName as String

rptName = SOME VALUE FROM THE HREF PASSED FROM Reports.aspx Sales By Region
link.

rptOpts.ReportPath = "/Sales/" & rptName

TIA

JeffP......
 
J

JDP@Work

Thanks that works great... I'm not to ASP smart and a .Net newbie, I realized,
"dugh¿"

QueryString, is just bit more formal in .Net

I also deciphered how to use a button to make the report rather than a <a>

It looks alot cleaner with a Cancel and Make Report buttons.....

I just need to be able to mod my ReportSetup to accept a mime type (dynamic) and
I'm done for now.

TIA

JeffP.....

Eran Kampf said:
Use Page.Request.QueryString["Report"] to get the value of the Report
parameter in the Url...

Eran Kampf
http://www.ekampf.com

JDP@Work said:
I want to pass a SRS report name from the reports page that has a hyperlink
for
each SRS report in the Sales folder.

So far I have the following....

Reports.aspx
<html>
....omitted code
<a onfocus="this.blur()"
onclick="NewWindow(this.href,'ReportOptions','400','400','no','center');return
false"
href="./reports/RptOptions.aspx?Report=SalesbyRegion">Sales By
Region</a>


As long as I hard code my report name in the RptOptions page I can render
my
report, however I'd like the value SalesbyRegion to actually be the report
that
is rendered.


RptOptions.vb
..... omitted code
Dim rptOpts as New Common.ReportSetup
rptOpts.ReportPath = "/Sales/SalesbyRegion"


I think that I want something more like....


RptOptions.vb
..... omitted code
Dim rptOpts as New Common.ReportSetup
Dim rptName as String

rptName = SOME VALUE FROM THE HREF PASSED FROM Reports.aspx Sales By
Region
link.

rptOpts.ReportPath = "/Sales/" & rptName

TIA

JeffP......
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,770
Messages
2,569,583
Members
45,074
Latest member
StanleyFra

Latest Threads

Top