javascript and navigateurl

Discussion in 'ASP .Net' started by acadam, Oct 24, 2006.

  1. acadam

    acadam Guest

    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!!
     
    acadam, Oct 24, 2006
    #1
    1. Advertising

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

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Mike

    NavigateUrl and Javscript

    Mike, Jul 17, 2004, in forum: ASP .Net
    Replies:
    1
    Views:
    397
    Martin Honnen
    Jul 17, 2004
  2. Tomek R.
    Replies:
    7
    Views:
    8,239
    Sobot
    Feb 13, 2009
  3. weiwei
    Replies:
    0
    Views:
    650
    weiwei
    Mar 16, 2006
  4. David C

    NavigateURL and javascript

    David C, Jul 28, 2009, in forum: ASP .Net
    Replies:
    1
    Views:
    4,015
    David C
    Jul 28, 2009
  5. acadam

    javascript and navigateurl

    acadam, Oct 24, 2006, in forum: ASP .Net Web Controls
    Replies:
    1
    Views:
    128
Loading...

Share This Page