![]() |
| |||||||
| Sponsored Links |
![]() | « Previous Thread | Next Thread » |
| | LinkBack | Thread Tools | Display Modes |
|
#1
| ||||
| ||||
| I keep getting errors saying "master_pc is ambiguous in the namespace 'ASP' when loading some of my pages. master_pc is the name of my main Public class in my Master Page. The Error is on line: Code: Public Shadows ReadOnly Property Master() as ASP.master_pc <edit>The file it references is App_Web_..... which I presume is one created by .Net during compilation</edit> Last edited by richyrich; May 19th, 2008 at 10:05 AM. |
| Sponsored Links |
|
#2
| ||||
| ||||
| If I change the properties in the Master Page to shared then I get another ambiguous error saying "master_pc is ambiguous". This time it relates to code in my content page that's trying to access a shared property in the master page. Code: master_pc.connString I've only started having this problem recently... |
|
#3
| ||||
| ||||
| See this: '<name>' is ambiguous in the namespace '<namespacename>' If it doesn't work, then try renaming it.
__________________ jmurrayhead If you agree with me... click the icon! If my post solved your problem, click the button in the lower right-hand corner of the post.Join our Folding team: DeveloperBarn Folding |
|
#4
| ||||
| ||||
| Hmmm....I renamed it before when I had this problem. Renamed it again and it's working again. Now I'm getting another error, "Nullable object must have a value" on one of my date fields, even though the field in the db does have a value in it and I'm using if not isdbnull(rs("dateadded")) then to populate the field...... |
|
#6
| ||||
| ||||
| I tried making a change to fix the date problem and now it's saying the name of the class in my Master page is ambiguous again... ![]() This is doing my head in!!!!!! |
|
#7
| ||||
| ||||
| OK. I think I may have solved this issue, fingers crossed. It seems that if the class of my content page was set to partial, I got the error. If I set it to Public, it stopped the error. I had a similar issue with a user control. I removed the ClassName attribute from the Control declaration and kept the class as Partial and that seemed to solve that. Fingers crossed this won't start happening again now... ![]() Just a note J. On the date fields, if I have a field value as NULL and I don't have if not isdbnull() it threw an error. Damn annoying... |
|
#8
| ||||
| ||||
| That's odd, because I have a property: Code: Private _myDate As Nullable(Of Date)
Public Property MyDate() As Nullable(Of Date)
Get
Return _myDate
End Get
Set(ByVal value As Nullable(Of Date))
_myDate = value
End Set
End Property
As far as the declaration of your class...you should be able to keep it as Partial...there must be something else wrong with your code. |
|
#9
| ||||
| ||||
| Must be...It's just happened again with the class set to Public. How do I find out what the "real" problem is, because it's obviously not that the class name is ambiguous? Maybe I'll try re-jigging things, so the shared properties I want are in my BO layer. See if that helps. |
![]() |
|
| Bookmarks |
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads | ||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Class library | Shem | .Net Development | 11 | May 22nd, 2008 07:01 AM |