Click here to Skip to main content
12,352,294 members (56,312 online)
Rate this:
 
Please Sign up or sign in to vote.
See more: C# ASP.NET
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 4-Dec-12 2:56am
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 Patil 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

Rate this: bad
 
good
Please Sign up or sign in to vote.

Solution 1

try to load java script file from code behind


this.Page.ClientScript.RegisterClientScriptInclude("myscript", "myscript.js")
  Permalink  

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

  Print Answers RSS
Top Experts
Last 24hrsThis month


Advertise | Privacy | Mobile
Web02 | 2.8.160621.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2016
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100