Loading JavaScript files from a class library

Discussion in 'ASP .Net Web Controls' started by ArtG, Feb 22, 2007.

  1. ArtG

    ArtG Guest

    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?
     
    ArtG, Feb 22, 2007
    #1
    1. Advertising

  2. ArtG

    Mark Nelson Guest

    ArtG,

    Please check whether you have done the following steps

    1) Download and install the source
    http://www.microsoft.com/downloads/...CC-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?
     
    Mark Nelson, Feb 23, 2007
    #2
    1. Advertising

  3. ArtG

    ArtG Guest

    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

    "Mark Nelson" wrote:

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

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. matt melton
    Replies:
    6
    Views:
    530
    Gordon Beaton
    Sep 8, 2003
  2. E11
    Replies:
    1
    Views:
    4,786
    Thomas Weidenfeller
    Oct 12, 2005
  3. Replies:
    5
    Views:
    170
  4. Replies:
    4
    Views:
    311
  5. Replies:
    1
    Views:
    117
    Randy Webb
    Apr 14, 2006
Loading...

Share This Page