Sunday, June 15, 2008

Embedding a resource in your ASP.NET 2.0 assembly

While developing a web part for Sharepoint I came across an issue where I needed to have Javascript manipulate elements in the web part. I searched around for the best way to include my Javascript file as part of my Sharepoint solution and came across many articles but I couldn't get their methods to work until I came across this one:
http://www.codeproject.com/KB/aspnet/MyWebResourceProj.aspx

I'm not sure why but "Page.ClientScript.GetWebResourceUrl" seems to work for me but "Page.ClientScript.RegisterClientScriptResource" as per this article doesn't.

No comments:

Post a Comment