Groups | Blog | Home
all groups > asp.net webcontrols > may 2007 >

asp.net webcontrols : store external javascript files in aspnet_client subfolder



deepblu NO[at]SPAM gmail.com
5/24/2007 2:19:45 PM
I'm building a composite control for ASP.NET 1.1 that relies on
external javascript (.js) files. I've noticed the Microsoft custom web
controls make use of the C:\Inetpub\wwwroot\aspnet_client subfolder to
store common javascript files and other include common files. I've
also noticed some third-party control vendors have successfully made
use of this folder by including their own subfolder under
aspnet_client and dumping .js files in there.

I'd like to know if there is a tool that be used to map my includes to
point to this directory so when my control performs a <script
language='javascript' src='myscript.js'> it resolves to the common
subfolder under aspnet_client.

It seems like Mirosoft would provide a standardized approach to
storing common .js files for use in custom web controls, so I'm
guessing I just haven't found the documentation on how to utilize
this. Thanks.
Jeff User
5/27/2007 12:15:31 AM
[quoted text, click to view]

Hi everyone.
I happen to be looking for the exact same information. I would also
like to know how to get the js files into the aspnet_client folder
when installing the component.

Has anyone here had experience building web controls and using js
within?
Thanks
Alexey Smirnov
5/27/2007 12:32:37 AM
[quoted text, click to view]

http://msdn2.microsoft.com/en-us/library/aa719700(VS.71).aspx
Alexey Smirnov
5/27/2007 12:38:52 AM
[quoted text, click to view]

Note: In ASP.NET 2.0 you can take advantage of web resources. Web
resources allow resources to be embedded in an assembly and are
retrieved through the web resources handler. The following sample
shows use of an embedded JavaScript file and use of the
Page.ClientScript.RegisterClientScriptResource method.

http://quickstarts.asp.net/QuickStartv20/aspnet/doc/extensibility.aspx
AddThis Social Bookmark Button