Solved

Call Javascript function in datagrid's hyperlink column

Posted on 2004-08-11
4
729 Views
Last Modified: 2008-01-16
I want to use Javascript to open a page in a new, sized, window. I have a hyperlink column in my datagrid to do this, and basically want to call a Javascript function EditPage with the ID column as the parameter:

    EditPage({0})

How do I set this up in the Property Builder of Visual Studio .Net?
0
Comment
Question by:crescendo
4 Comments
 
LVL 4

Expert Comment

by:marko020397
ID: 11777713
I think you will have to use TemplateColumn. For hyperlink in column use <%# DataBinder.Eval (container.DataItem, "ID") %> or something like this.
0
 
LVL 9

Author Comment

by:crescendo
ID: 11796941
I solved it. I can use Javascript, but my error was to put a space after "Javascript:". The correct URL is:

   Javascript:EditPage({0})

0
 

Accepted Solution

by:
RomMod earned 0 total points
ID: 11826582
The question has been PAQ'd and the 250 points have been refunded.
RomMod
Community Support Moderator
0

Featured Post

VMware Disaster Recovery and Data Protection

In this expert guide, you’ll learn about the components of a Modern Data Center. You will use cases for the value-added capabilities of Veeam®, including combining backup and replication for VMware disaster recovery and using replication for data center migration.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

In an ASP.NET application, I faced some technical problems. In this article, I list them out and show the solutions that I found.  I hope it will be useful. Problem: After closing a pop-up window, the parent page should be refreshed automaticall…
The article shows the basic steps of integrating an HTML theme template into an ASP.NET MVC project
This Micro Tutorial will give you a basic overview how to record your screen with Microsoft Expression Encoder. This program is still free and open for the public to download. This will be demonstrated using Microsoft Expression Encoder 4.
Although Jacob Bernoulli (1654-1705) has been credited as the creator of "Binomial Distribution Table", Gottfried Leibniz (1646-1716) did his dissertation on the subject in 1666; Leibniz you may recall is the co-inventor of "Calculus" and beat Isaac…

803 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question