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!!
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!!