could not load type

J

john

Hi,

I tried with "Developing a Simple ASP.NET Server Control" from MSDN a
http://msdn.microsoft.com/library/d...alkthroughdevelopingsimplewebformscontrol.asp

But I saw "Error Creating Contro - Firstcontrol1" at the design tim
and when I try to run it, I get

Parser Error
Description: An error occurred during the parsing of a resource required to service this request. Please review the following specific parse error details and modify your source file appropriately.

Parser Error Message: Could not load type CustomControls.FirstControl from assembly CustomControls, Version=1.0.1561.36680, Culture=neutral, PublicKeyToken=null

Source Error:

Line 5: <form runat=server ID="Form1">
Line 6: Here is a custom ASP.NET server control.<br><br
Line 7: <Custom:FirstControl Message= "This control tells time. " runat=server ID="Firstcontrol1"/>
Line 8: <br>
Line 9: </form


Source File: c:\inetpub\wwwroot\TestMyControls\WebForm1.aspx Line: 7

-------------------------------------------------------------------------------
Version Information: Microsoft .NET Framework Version:1.1.4322.573; ASP.NET Version:1.1.4322.57


Appreciate your help

--John
 
V

Victor Garcia Aprea [MVP]

Hi john,

Seems like the designer can't find the type you've specified. Make sure you
first compile the assembly containing the control. Just in case restart
VS.NET in order to give it a chance to catchup with the changes.

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
john said:
Hi,

I tried with "Developing a Simple ASP.NET Server Control" from MSDN at
http://msdn.microsoft.com/library/d...alkthroughdevelopingsimplewebformscontrol.asp.

But I saw "Error Creating Contro - Firstcontrol1" at the design time
and when I try to run it, I get:

Parser Error
Description: An error occurred during the parsing of a resource required
to service this request. Please review the following specific parse error
details and modify your source file appropriately.
Parser Error Message: Could not load type CustomControls.FirstControl from
assembly CustomControls, Version=1.0.1561.36680, Culture=neutral,
PublicKeyToken=null.
Source Error:


Line 5: <form runat=server ID="Form1">
Line 6: Here is a custom ASP.NET server control.<br><br>
Line 7: <Custom:FirstControl Message= "This control tells time.
" runat=server ID="Firstcontrol1"/>
 

Ask a Question

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

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,795
Messages
2,569,644
Members
45,357
Latest member
RuthEsteve

Latest Threads

Top