Click here to Skip to main content
13,086,120 members (84,106 online)
Rate this:
Please Sign up or sign in to vote.
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 8-Feb-11 8:31am
Updated 8-Feb-11 8:43am

1 solution

Rate this: bad
Please Sign up or sign in to vote.

Solution 2

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[^]

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

  Print Answers RSS
Top Experts
Last 24hrsThis month

Advertise | Privacy |
Web01 | 2.8.170813.1 | Last Updated 8 Feb 2011
Copyright © CodeProject, 1999-2017
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100