- Add javascript file to your project
- Set Build Action of this file Embeded Resource
- Add the following entry into your AssemblyInfo.cs
[assembly: WebResource("YourNameSpace.Filename.js", "text/javascript")]
- Add following code in your OnInit event
string webresourceURL = Page.ClientScript.GetWebResourceUrl(this.GetType(), "YourNameSpace.Filename.js");
this.Page.ClientScript.RegisterClientScriptInclude(this.GetType(), "cctextbox",webresourceURL); - Please remember YourNameSpace is base name space in your project
No comments:
Post a Comment