RSS Forums RSS

Tag Prefix and Assembly error

Reply
Posts: 97
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

  #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>
  33.  
  34.  
  35.  


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 11:04 am.
AddThis Social Bookmark Button
Reply With Quote  
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

  #2  
Jan 4th, 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  
Posts: 97
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

  #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  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.



Other Threads in the ASP.NET Forum
Views: 974 | Replies: 2 | Currently Viewing: 1 (0 members and 1 guests)

 

Thread Tools Display Modes
Forums | Blogs | Tutorials | Code Snippets | Whitepapers | RSS Feeds | Advertising
All times are GMT -4. The time now is 2:08 pm.
Newsletter Archive - Sitemap - Privacy Statement - Acceptable Use Policy - Contact Us
Forum system based on vBulletin Copyright ©2000 - 2009, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC