Connecting Tech Pros Worldwide Forums | Help | Site Map

hyperlink sending params

Newbie
 
Join Date: Jun 2007
Posts: 3
#1: Jun 18 '07
I've seen about 1000 links to how to pick up values from a dataview or a gridview.

I have a hyperlink that I would like to pick up some values from the page, and send the user to a new page with those values as params.

Ideally, I'd like to set up something in the navigateURL of the hyperlink like this:
comments.aspx?measure=ABCD&fac="whatever they have picked from a dropdown before they click on the hyperlink"

at one point I know there was a way to make a column a template column and pass things using page.aspx?abc={0}&def={1}, 'firstValue', 'secondValue' but I think that's with the data grid right?

nateraaaa's Avatar
Expert
 
Join Date: May 2007
Location: Illinois
Posts: 663
#2: Jun 18 '07

re: hyperlink sending params


Quote:

Originally Posted by mattcushing

I've seen about 1000 links to how to pick up values from a dataview or a gridview.

I have a hyperlink that I would like to pick up some values from the page, and send the user to a new page with those values as params.

Ideally, I'd like to set up something in the navigateURL of the hyperlink like this:
comments.aspx?measure=ABCD&fac="whatever they have picked from a dropdown before they click on the hyperlink"

at one point I know there was a way to make a column a template column and pass things using page.aspx?abc={0}&def={1}, 'firstValue', 'secondValue' but I think that's with the data grid right?

You could assign values to the NavigateUrl property in the code behind.

Expand|Select|Wrap|Line Numbers
  1. link.NavigateUrl = "Comments.aspx?measure=" + intValue + "fac=" + ddl.SelectedItem.Text;
Nathan
Newbie
 
Join Date: Jun 2007
Posts: 3
#3: Jun 18 '07

re: hyperlink sending params


Quote:

Originally Posted by nateraaaa

You could assign values to the NavigateUrl property in the code behind.

Expand|Select|Wrap|Line Numbers
  1. link.NavigateUrl = "Comments.aspx?measure=" + intValue + "fac=" + ddl.SelectedItem.Text;
Nathan

wow, that was easy!! Nice advice Nathan, thanks!
Reply