Load file in Asp.Net 2.0

S

shapper

Hello,

I am creating a custom control where a javascript file is added to a
page:

ClientScript.RegisterClientScriptInclude(Me.GetType(), Me.Name, Me.Url)
(*)

Everything works fine when I use in my page:
MyCustomControl.Url = "Code/MyFile.js"

However the following does not work:
MyCustomControl.Url = "~/Code/MyFile.js"

What should I change in my custom control code (*) so that "~/..."
would work?

Thanks,
Miguel
 

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
474,432
Messages
2,571,680
Members
48,796
Latest member
Greg L.

Latest Threads

Top