A A
RSS

asp.net 2.0 Error: ‘Title’ is not a member of ‘ASP…

Thu, Jan 11, 2007

Uncategorized

I had this error come up on a few pages after I deployed my website and it was driving me crazy. After hours of debugging, it turns out to be a simple problem. The problem is that I had duplicate page/user control names which when deployed was causing a naming conflict. This happens if for example I have a folder name members and a page name “myprofile.aspx” this creates a class named members_myprofil. Then if I have another user control under usercontrols\members\myprofile.ascx then its class also is name members_profile.

By default asp.net pages are compiled into multiple DLLs (one per folder, I think) and the only way I discovered this error is when I used the Web Deployment Project and tried to get it to merge the DLLs into a single DLL (as in asp.net 1/1.1). Initially, the build failed with the error: “aspnet_merge.exe” exited with code 1, which wasn’t very helpful. After some research, I found this link http://geekswithblogs.net/michelotti/archive/2006/07/31/86754.aspx which tells you how to show more informative aspnet_merge errors. By looking in the build output window, I was able to find the offending classes/pages and fix/rename them.

I hope this helps.

Tags:

  • AmitCBR
    Thanks !!!
  • syed
    This error can be solved like this…see the code below..this code would be there in your .aspx file.

    here inherits=”test” …is the thing to keep in mind.

    Now go to your .vb file…

    Partial Class Test
    Inherits System.Web.UI.Page



    remember that Partial class name should be same as the file inherited from( in this case its “Test”).
  • Adele
    Thanks that was very helpfull!
blog comments powered by Disqus
Advertise Here
The Most Intelligent Add-In To Visual Studio Happy fan of

What I'm Doing...

Yonkly Open Source

Sign up for my newsletter




* = required field

powered by MailChimp!

megree Widget

Apparently, I am connected to Obama. Check this out...
My path to Obama

Cyber Identity