Tag Prefix and Assembly error

Please support our ASP.NET advertiser: Intel Parallel Studio Home
Reply

Join Date: Nov 2008
Posts: 99
Reputation: csharplearner is an unknown quantity at this point 
Solved Threads: 3
csharplearner's Avatar
csharplearner csharplearner is offline Offline
Junior Poster in Training

Tag Prefix and Assembly error

 
0
  #1
Jan 4th, 2009
Hi all,

I am trying to create Web Controls and i am getting this error:

Could not load file or assembly 'Microsoft.Web.UI.WebControls' or one of its dependencies. The system cannot find the file specified.


i inserted all respective directives and namespaces at the begining of the page and also in the web.config file. But it still says it cannot find the file specified.

My code goes as following:

  1.  
  2. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="toolbars.aspx.cs" Inherits="toolbars" %>
  3. <%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
  4. <%@ Register TagPrefix="webControls"
  5. Namespace="Microsoft.Web.UI.WebControls"
  6. Assembly="Microsoft.Web.UI.WebControls" %>
  7.  
  8.  
  9. <html >
  10. <head runat="server">
  11. <title>Untitled Page</title>
  12. <script language="c#" runat="server">
  13. public void buttonSelected(Object sender, EventArgs e)
  14. {
  15. string name;
  16. name = sender.ToString();
  17. Response.Write(name);
  18. }
  19. </script>
  20. </head>
  21. <body>
  22. <form id="form1" runat="server">
  23. <div>
  24. <h1>USING TOOLBAR ELEMENTS</h1>
  25. <webControls:Toolbar id="toolbar" runat="server" onButtonClick="buttonSelected" >
  26. <webControls:ToolbarButton id="home" Text="Home" />
  27. <webControls:ToolbarButton id="call" Text="Callus" />
  28. </webControls:Toolbar>
  29. </div>
  30. </form>
  31. </body>
  32. </html>


i inserted the tagprefix in the page elements section of the web.config file too as following

  1. :
  2. :
  3. :
  4. :
  5.  
  6. <pages enableViewStateMac="false" >
  7. <controls>
  8. <add tagPrefix="asp" namespace="System.Web.UI" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  9. <add tagPrefix="asp" namespace="System.Web.UI.WebControls" assembly="System.Web.Extensions, Version=3.5.0.0, Culture=neutral, PublicKeyToken=31BF3856AD364E35"/>
  10. <add tagPrefix="webControls" namespace="Microsoft.Web.UI.WebControls" assembly="Microsoft.Web.UI.WebControls" />
  11. </controls>
  12. </pages>
  13. :
  14. :
  15. :
  16. :
Thanks in advance.
Last edited by csharplearner; Jan 4th, 2009 at 12:04 pm.
Reply With Quote Quick reply to this message  
Join Date: Jul 2008
Posts: 49
Reputation: iDeveloper is an unknown quantity at this point 
Solved Threads: 7
iDeveloper iDeveloper is offline Offline
Light Poster

Re: Tag Prefix and Assembly error

 
0
  #2
Jan 5th, 2009
The problem is exactly what the error says. The compiler cannot find Microsoft.Web.UI.WebControls in your project. I'm assuming this is the library for IE controls because i don't recognize it as part of the standard libraries. Hence, you probably need to download it, locate it on your machine and reference it in your project.
Reply With Quote Quick reply to this message  
Join Date: Nov 2008
Posts: 99
Reputation: csharplearner is an unknown quantity at this point 
Solved Threads: 3
csharplearner's Avatar
csharplearner csharplearner is offline Offline
Junior Poster in Training

Re: Tag Prefix and Assembly error

 
0
  #3
Jan 5th, 2009
Originally Posted by iDeveloper View Post
The problem is exactly what the error says. The compiler cannot find Microsoft.Web.UI.WebControls in your project. I'm assuming this is the library for IE controls because i don't recognize it as part of the standard libraries. Hence, you probably need to download it, locate it on your machine and reference it in your project.
I downloaded trial version of Visual Studio 2008 Professional.. so doesnt it come with the package?
Can u please tell how to check if a particular library is present in the package or not?!
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:



Other Threads in the ASP.NET Forum
Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC