Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > javascript and navigateurl

Thread Tools

javascript and navigateurl

Posts: n/a
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
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.


ps: sorry for my bad english!!

Reply With Quote

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off

Similar Threads
Thread Thread Starter Forum Replies Last Post
NavigateURL and javascript David C ASP .Net 1 07-28-2009 02:06 PM
hyperlink and dynamically formed NavigateURL problem Tomek R. ASP .Net 7 02-13-2009 05:12 PM
javascript and navigateurl acadam ASP .Net Web Controls 1 10-26-2006 02:48 AM
delete button and variable in NavigateUrl in VS2005 weiwei ASP .Net 0 03-16-2006 10:06 PM
NavigateUrl and Javscript Mike ASP .Net 1 07-17-2004 10:50 AM