Wrox Programmer Forums
Go Back   Wrox Programmer Forums > ASP.NET and ASP > ASP.NET 3.5 > ASP.NET 3.5 Basics
|
ASP.NET 3.5 Basics If you are new to ASP or ASP.NET programming with version 3.5, this is the forum to begin asking questions. Please also see the Visual Web Developer 2008 forum.
Welcome to the p2p.wrox.com Forums.

You are currently viewing the ASP.NET 3.5 Basics section of the Wrox Programmer to Programmer discussions. This is a community of software programmers and website developers including Wrox book authors and readers. New member registration was closed in 2019. New posts were shut off and the site was archived into this static format as of October 1, 2020. If you require technical support for a Wrox book please contact http://hub.wiley.com
 
Old July 9th, 2009, 12:45 PM
Authorized User
 
Join Date: Jun 2009
Posts: 66
Thanks: 22
Thanked 0 Times in 0 Posts
Default Error 120 Could not load type

I am having this following error when I try to build and publish the web application:
Error 120 Could not load type 'HIV.EnrollmentPage1'. C:\inetpub\wwwroot\hiv\EnrollmentPage1.aspx 1

Any suggestion?

Thanks in advance
 
Old July 11th, 2009, 09:57 AM
Imar's Avatar
Wrox Author
 
Join Date: Jun 2003
Posts: 17,089
Thanks: 80
Thanked 1,576 Times in 1,552 Posts
Default

Hi there,

Make sure that the class name defined in the .aspx part of the pages matches with the one defined in the Code Behind. You need to take both the class name and the namespace into account. E.g. the following class in Code Behind:

namepace Test
{
class SomeClass : Page {}
}
should end up as Test.SomeClass in the page directive...

Hope this helps,

Imar
__________________
Imar Spaanjaars
http://Imar.Spaanjaars.Com
Follow me on Twitter

Author of Beginning ASP.NET 4.5 : in C# and VB, Beginning ASP.NET Web Pages with WebMatrix
and Beginning ASP.NET 4 : in C# and VB.
Did this post help you? Click the button below this post to show your appreciation!
The Following User Says Thank You to Imar For This Useful Post:
skhan (July 14th, 2009)





Similar Threads
Thread Thread Starter Forum Replies Last Post
Could not load type 'WebForm1' error hastikeyvan ASP.NET 2.0 Professional 10 July 14th, 2008 01:16 PM
Error could not load type - RoleManager mussitsch ASP.NET 2.0 Professional 0 August 21st, 2007 11:31 AM
Parser Error Message: Could not load type '_Defaul sahmed1983 VB Databases Basics 1 January 25th, 2007 09:12 AM
Could not load type 'WebForm1' error hastikeyvan ASP.NET 2.0 Basics 0 June 22nd, 2006 01:31 AM





Powered by vBulletin®
Copyright ©2000 - 2020, Jelsoft Enterprises Ltd.
Copyright (c) 2020 John Wiley & Sons, Inc.