Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Code Behind problem

Status
Not open for further replies.

sthmpsn1

MIS
Sep 26, 2001
456
US
I am very new to code behind and I am recieving the following error.

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 'vsstuff.staff'.

Source Error:


Line 1: <%@ Page Language=&quot;vb&quot; Debug=&quot;true&quot; CodeBehind=&quot;staff.aspx.vb&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;vsstuff.staff&quot; %>


I assume it is refering to a vsstuff.staff.resx file that VS created. VS studio automatically created this file and put it in the same directory that the .aspx page is located. Am I missing something.
 
It isn't refering to the .resx file but to the class that is contained within the staff.aspx.vb file.

vsstuff is the namespace of your project. It uses this because all the code is compiled into one dll vsstuff and it is trying to access the class staff. That'l do donkey, that'l do
[bravo] Mark
 
I have a public class staff in the .vb file. WHat do I need to change???

Public Class staff

Code

End Class
 
check to see that your namespaces are ok.

Right click properties on the project. That'l do donkey, that'l do
[bravo] Mark
 
what would I be looking for? I don't see anything labeled namespaces. Everything else I see mentions my project name?
 
Well it seemed to like it when I hit rebuild on the right click menu.
 
One thing I've had to do, is get rid of the namespace. So your line would look like this:
<%@ Page Language=&quot;vb&quot; Debug=&quot;true&quot; CodeBehind=&quot;staff.aspx.vb&quot; Src=&quot;staff.aspx.vb&quot; AutoEventWireup=&quot;false&quot; Inherits=&quot;staff&quot; %>

Notice, I also added the Src line. This is what has been working for me. If it works for you, check this thread for some more info:
thread855-370949
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top