Click here to Skip to main content
Rate this: bad
good
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 3:56am
Comments
Teenustar at 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 at 5-Dec-12 0:34am
   
No ,I have not refered JS file
Suvabrata Roy at 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)



Advertise | Privacy | Mobile
Web03 | 2.8.150129.1 | Last Updated 3 Jan 2013
Copyright © CodeProject, 1999-2015
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