RSS Forums RSS

TagPrefix and Assembly error

Please support our C# advertiser: DiscountASP.NET – 3 Months Free on C# Web Hosting
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

TagPrefix and Assembly error

  #1  
Jan 3rd, 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. <%@ Page Language="C#" AutoEventWireup="true" CodeFile="toolbars.aspx.cs" Inherits="toolbars" %>
  2. <%@ Import Namespace="Microsoft.Web.UI.WebControls" %>
  3. <%@ Register TagPrefix="webControls"
  4. Namespace="Microsoft.Web.UI.WebControls"
  5. Assembly="Microsoft.Web.UI.WebControls" %>
  6.  
  7.  
  8. <html >
  9. <head runat="server">
  10. <title>Untitled Page</title>
  11. <script language="c#" runat="server">
  12. public void buttonSelected(Object sender, EventArgs e)
  13. {
  14. string name;
  15. name = sender.ToString();
  16. Response.Write(name);
  17. }
  18. </script>
  19. </head>
  20. <body>
  21. <form id="form1" runat="server">
  22. <div>
  23. <h1>USING TOOLBAR ELEMENTS</h1>
  24. <webControls:Toolbar id="toolbar" runat="server" onButtonClick="buttonSelected" >
  25. <webControls:ToolbarButton id="home" Text="Home" />
  26. <webControls:ToolbarButton id="call" Text="Callus" />
  27. </webControls:Toolbar>
  28. </div>
  29. </form>
  30. </body>
  31. </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 3rd, 2009 at 11:30 pm.
AddThis Social Bookmark Button
Reply With Quote  
Posts: 1,873
Reputation: Ramy Mahrous has a spectacular aura about Ramy Mahrous has a spectacular aura about 
Solved Threads: 214
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Posting Virtuoso

Re: TagPrefix and Assembly error

  #2  
Jan 4th, 2009
BI Developer | LINKdotNET
B.Sc Computer Science, Helwan University
Technical blog | http://ramymahrous.wordpress.com
LinkedIn | http://www.linkedin.com/in/ramymahrous
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: TagPrefix and Assembly error

  #3  
Jan 4th, 2009
Originally Posted by RamyMahrous View Post
ASP.NET forum http://www.daniweb.com/forums/forum18.html


Are you saying you want me to post it in ASP.NET forum ?!
I have already run a search for my query there and did not get any related issues.
May be i have to post the query there fr getting better answers.

Thanx.
Reply With Quote  
Posts: 1,734
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 184
LizR LizR is offline Offline
Posting Virtuoso

Re: TagPrefix and Assembly error

  #4  
Jan 4th, 2009
Is the error on your machine or on the webserver you uploaded to? the asp.net forum would be better as this is a generic c# forum, the guys in the asp.net are more dedicated to webservers
Did I just hear "You gotta help us, Doc. We've tried nothin' and we're all out of ideas" ? Is this you? Dont let this be you! I will put in as much effort as you seem to.
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: TagPrefix and Assembly error

  #5  
Jan 4th, 2009
Originally Posted by LizR View Post
Is the error on your machine or on the webserver you uploaded to? the asp.net forum would be better as this is a generic c# forum, the guys in the asp.net are more dedicated to webservers


Thnx , I posted it there..
The error is on my machine not on any webserver.
Reply With Quote  
Reply

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



Similar Threads
Other Threads in the C# Forum
Views: 634 | Replies: 4 | 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:14 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