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