all groups > asp.net webcontrols > october 2004 >
You're in the

asp.net webcontrols

group:

How do I pass a value in a Hyperlink?


How do I pass a value in a Hyperlink? JDP NO[at]SPAM Work
10/31/2004 8:19:20 PM
asp.net webcontrols:
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......

Re: How do I pass a value in a Hyperlink? JDP NO[at]SPAM Work
11/1/2004 8:30:02 AM
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.....

[quoted text, click to view]

Re: How do I pass a value in a Hyperlink? Eran Kampf
11/1/2004 2:40:34 PM
Use Page.Request.QueryString["Report"] to get the value of the Report
parameter in the Url...

Eran Kampf
http://www.ekampf.com

[quoted text, click to view]

AddThis Social Bookmark Button