Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > ASP .Net Web Controls > Loading JavaScript files from a class library

Reply
Thread Tools

Loading JavaScript files from a class library

 
 
ArtG
Guest
Posts: n/a
 
      02-22-2007
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?
 
Reply With Quote
 
 
 
 
Mark Nelson
Guest
Posts: n/a
 
      02-23-2007
ArtG,

Please check whether you have done the following steps

1) Download and install the source
http://www.microsoft.com/downloads/t...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?

 
Reply With Quote
 
 
 
 
ArtG
Guest
Posts: n/a
 
      02-23-2007
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\UpdatePanelControlT rigger.cs 9 22 ClassLibrary3

"Mark Nelson" wrote:

> ArtG,
>
> Please check whether you have done the following steps
>
> 1) Download and install the source
> http://www.microsoft.com/downloads/t...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?

 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Nested Class, Member Class, Inner Class, Local Class, Anonymous Class E11 Java 1 10-12-2005 03:34 PM
Image loading using javascript. Handling timeouts and parrallel loading under IE zborisau@gmail.com Javascript 4 08-28-2005 02:02 PM
Re: Difference between Web Control Library and Class Library Alan Ferrandiz [MCT] ASP .Net 0 09-11-2004 01:51 PM
Re: Difference between Web Control Library and Class Library Mythran ASP .Net 0 08-24-2004 05:53 PM
Class Files and Class Loading in NT and UNIX matt melton Java 6 09-08-2003 10:09 AM



Advertisments