Click here to Skip to main content
15,885,546 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
Hello everyone!
I am using a Datalist to display records. Each record has an Image and a hyperlink to more information. Now I need that hyperlink navigateUrl have two parameters. One for userId and second one for userName. To find out which record's hyperlink was clicked the key for the record also has to be included. So how do I create an URL based on the records key that also contains the users id and name as parameters and set navigateUrl to the hyperlink.

Note: I don't want to use linkButton instead of hyperlink, because it's unable to open in new window and new tab and Google is unable to get the URL from a link button, so please don't suggest the use of a link button.

Thanks in advance for your replies!
Posted
Updated 8-Feb-11 8:43am
v3

1 solution

It is not clear why can't the record id also append in the query string as each record display a hyperlink.

It may not be safe to pass the user id in the url string. Refer this article for further information how to securely pass the query string parameters.

Preventive Method for URL Request Forgery- An Example with ASP.NET MVC[^]
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900