Click here to Skip to main content
Rate this: bad
good
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 9:31am
Edited 8-Feb-11 9:43am
v3

1 solution

Rate this: bad
good
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[^]
  Permalink  

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

  Print Answers RSS
0 OriginalGriff 190
1 Jochen Arndt 165
2 PIEBALDconsult 150
3 BillWoodruff 148
4 DamithSL 140
0 OriginalGriff 5,695
1 DamithSL 4,591
2 Maciej Los 4,012
3 Kornfeld Eliyahu Peter 3,480
4 Sergey Alexandrovich Kryukov 3,190


Advertise | Privacy | Mobile
Web01 | 2.8.141220.1 | Last Updated 8 Feb 2011
Copyright © CodeProject, 1999-2014
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