javascript and navigateurl

A

acadam

Hi,
I have an userControl .ascx with a gridView control. One of the columns
is a TemplateField with an HyperLink control. On the Row_DataBound
event, I am checking that one of the other columns contains a value,
then I would open a pop-up window. I am showing the HyperLink control
only sometimes and I set the NavigateUrl only in these cases. In order
to implement the pop-up window I try to put the javascript function
into the file .ascx and then I call it with
NavigateUrl="javascript:myfunction();". So, it's all ok.

Now. I would have to use the javascript function in other usercontrol
..ascx. I tried to create an external file .js and I put into the
section <HEAD> of my usercontrol the statement
<script.... src='myfilejs.js'/> but it doesn't work. I tried with
several methods of ClientScriptManager (I'm working with asp.net
2.0)... I used RegisterClientScriptInclude and
RegisterClientScriptBlock but the result is the same... nothing! Why?
How do I implement ClientScriptManager? It's not possible to use in
some way an external .js file?

Thanks a lot.

davide

ps: sorry for my bad english!!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,756
Messages
2,569,535
Members
45,008
Latest member
obedient dusk

Latest Threads

Top