Click here to Skip to main content
16,019,873 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
hello guys,


I have facing below problem from 5 hrs,,,

I have added usercontrol dynamically,its added but on Usercontrol javascript no loaded. please tell me...
Posted
Comments
Teenustar 4-Dec-12 15:58pm    
Can you explain in detail the problem you are facing. Have you referenced the JS file which has the UserControl's Javascript?
madhuri@mumbai 5-Dec-12 0:34am    
No ,I have not refered JS file
Suvabrata Roy 3-Jan-13 1:42am    
If you have some custom script then, best practice is to add the script with the control, or if you have some logic to load the script the create resource file like Ajax.
If you required i can elaborate

1 solution

try to load java script file from code behind


C#
this.Page.ClientScript.RegisterClientScriptInclude("myscript", "myscript.js")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900