Click here to Skip to main content
15,901,205 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi,

I am working on asp.net web application and I have created a class named 'tdetails'
but neither it showing on intellisense of another .aspx.cs nor it working where I have to use properties and functions of this class for data insert update and delete.when I run the application.
It is showing a message-The type or namespace name 'TDetails' could not be found(are you missing a using directive or an assembly reference  )

















What I have tried:

I have chandged build action property of the class to compile but still it is giving error. I have created it outside app_code.
Posted
Updated 7-Nov-17 20:20pm
Comments
Karthik_Mahalingam 8-Nov-17 1:35am    
post the code.

You need to add a reference to the class where you want to use it. If the class is static you can access the members directly, if not, you'll need to create an object of the class and use the object to access the members.

For more information on how to add a reference visit here.
 
Share this answer
 
At last I put it in App_Code then I got new error
Exception Details: System.Web.HttpException: Content controls have to be top-level controls in a content page or a nested master page that references a master page.
It was due to <asp:content runat=server I missed to put runat= server attribute to it so I was getting that error. Now it is resolved.

thanks...
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900