Home All Groups Group Topic Archive Search About

Loading JavaScript files from a class library

Author
22 Feb 2007 11:29 PM
ArtG
I have a class library that contains web controls.  I would like to put Java
script files in the class library and have the web application download the
Javascript from the classlibrary.  I downloaded ASP/.Net AJAX and tried the
example in http://ajax.asp.net/docs/tutorials/EmbedScriptFile.aspx but I
can't get it to work.  I can't find the assembly System.Web.Extensions.  When
I try to build the classlibrary I get error messages saying that it cant find
UpdatePanel and ScriptManager.

Do you know where I can  find the DLL for System.Web.Extensions?  Will this
solve the problem?  Has anyone gotten this to work?

Author
23 Feb 2007 12:57 PM
Mark Nelson
ArtG,

Please check whether you have done the following steps

1) Download and install the source http://www.microsoft.com/downloads/thankyou.aspx?familyId=EF2C1ACC-051A-4FE6-AD72-F3BED8623B43&displayLang=en

2) Create a new C# project in Visual Studio. You can call it whatever you
want but I would suggest you avoid using the same namespace because the
System.Web namespace is strongly named and exists in several assemblies. I
called mine Dave.Web.Ajax

3) Copy all the files and folders from the source installed directory
(C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET 2.0 AJAX
Extensions\v1.0.61025\Source\System.Web.Extensions on my computer) into your
new project directory and include them in the project.

4) Make sure your Default Namespace on the project is properly set.

I'm doubting the step3, where you copy the ajax components to your project
library.
Please check that
--
Thanks & Regards,
Mark Nelson


Show quoteHide quote
"ArtG" wrote:

> I have a class library that contains web controls.  I would like to put Java
> script files in the class library and have the web application download the
> Javascript from the classlibrary.  I downloaded ASP/.Net AJAX and tried the
> example in http://ajax.asp.net/docs/tutorials/EmbedScriptFile.aspx but I
> can't get it to work.  I can't find the assembly System.Web.Extensions.  When
> I try to build the classlibrary I get error messages saying that it cant find
> UpdatePanel and ScriptManager.
>
> Do you know where I can  find the DLL for System.Web.Extensions?  Will this
> solve the problem?  Has anyone gotten this to work?
Author
23 Feb 2007 6:39 PM
ArtG
You're right.  Now I'm getting a lot further.  When I build the project,  get
the following errors.  Is there something else I need to copy?  What should
the default namespace for the project be set to?  Thanks

Error    1    The type or namespace name 'Resources' does not exist in the
namespace 'System.Web' (are you missing an assembly
reference?)    d:\vsprojects\ClassLibrary3\UI\UpdatePanelControlTrigger.cs    9    22    ClassLibrary3

Show quoteHide quote
"Mark Nelson" wrote:

> ArtG,
>
> Please check whether you have done the following steps
>
> 1) Download and install the source
> http://www.microsoft.com/downloads/thankyou.aspx?familyId=EF2C1ACC-051A-4FE6-AD72-F3BED8623B43&displayLang=en
>
> 2) Create a new C# project in Visual Studio. You can call it whatever you
> want but I would suggest you avoid using the same namespace because the
> System.Web namespace is strongly named and exists in several assemblies. I
> called mine Dave.Web.Ajax
>
> 3) Copy all the files and folders from the source installed directory
> (C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET 2.0 AJAX
> Extensions\v1.0.61025\Source\System.Web.Extensions on my computer) into your
> new project directory and include them in the project.
>
> 4) Make sure your Default Namespace on the project is properly set.
>
> I'm doubting the step3, where you copy the ajax components to your project
> library.
> Please check that
> --
> Thanks & Regards,
> Mark Nelson
>
>
> "ArtG" wrote:
>
> > I have a class library that contains web controls.  I would like to put Java
> > script files in the class library and have the web application download the
> > Javascript from the classlibrary.  I downloaded ASP/.Net AJAX and tried the
> > example in http://ajax.asp.net/docs/tutorials/EmbedScriptFile.aspx but I
> > can't get it to work.  I can't find the assembly System.Web.Extensions.  When
> > I try to build the classlibrary I get error messages saying that it cant find
> > UpdatePanel and ScriptManager.
> >
> > Do you know where I can  find the DLL for System.Web.Extensions?  Will this
> > solve the problem?  Has anyone gotten this to work?