TagPrefix and Assembly error

Please support our C# advertiser: $4.95 a Month - ASP.NET Web Hosting – Click Here!
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

TagPrefix 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. <%@ 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 4th, 2009 at 12:30 am.
Reply With Quote Quick reply to this message  
Join Date: Aug 2006
Posts: 2,065
Reputation: Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice Ramy Mahrous is just really nice 
Solved Threads: 256
Featured Poster
Ramy Mahrous's Avatar
Ramy Mahrous Ramy Mahrous is offline Offline
Postaholic

Re: TagPrefix and Assembly error

 
0
  #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 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: TagPrefix and Assembly error

 
0
  #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 Quick reply to this message  
Join Date: Aug 2008
Posts: 1,735
Reputation: LizR has a spectacular aura about LizR has a spectacular aura about 
Solved Threads: 186
LizR LizR is offline Offline
Posting Virtuoso

Re: TagPrefix and Assembly error

 
0
  #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 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: TagPrefix and Assembly error

 
0
  #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 Quick reply to this message  
Reply

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



Similar Threads
Other Threads in the C# Forum
Thread Tools Search this Thread



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

©2003 - 2009 DaniWeb® LLC