This is a migrated thread and some comments may be shown as answers.

Hyperlink onclick

2 Answers 265 Views
ListView
This is a migrated thread and some comments may be shown as answers.
Michael Gralke Augusto
Top achievements
Rank 1
Michael Gralke Augusto asked on 02 May 2011, 02:47 PM
Hi

Is there any way to have a link in a Listview which opens the URL in a New Window but also allows to pass the Record ID to a Server-Side VB function?

Imagine have a Table with ID and URL beeing 1 and http://www.telerik.com and 2 and http://www.algarveweb.com etc etc.

Now when the user click on the 1st link it will not only open the Telerik web-site but also insert a new record into a statistic table.

We could also the Grid if necessary.

Please advice, many thanks, Mike

2 Answers, 1 is accepted

Sort by
0
Accepted
Iana Tsolova
Telerik team
answered on 04 May 2011, 02:22 PM
Hello Michael,

You can try using an ASP:HyperLink to achieve your goal. Try setting its Target na NavigateUrl properties. Handle the onclick client-side event of the HyperLink to call as WebMethod or PageMethod which would perform the database operations.

Other than this, you can try using ASP:LinkButton and handle its Command server-side event to perform the database operations. Then from the server send a javascript code which would open a new window with the desired page.

Additionally, you can try our RadWindow control.

Kind regards,
Iana
the Telerik team

Browse the vast support resources we have to jump start your development with RadControls for ASP.NET AJAX. See how to integrate our AJAX controls seamlessly in SharePoint 2007/2010 visiting our common SharePoint portal.

0
Michael Gralke Augusto
Top achievements
Rank 1
answered on 05 May 2011, 11:55 AM
Hi Iana
 
Many thanks, I will give it a try.

Mike
Tags
ListView
Asked by
Michael Gralke Augusto
Top achievements
Rank 1
Answers by
Iana Tsolova
Telerik team
Michael Gralke Augusto
Top achievements
Rank 1
Share this question
or