473,762 Members | 8,598 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Not accessible ERROR!

Can someone please tell me why I'm getting the following error! I have
absolutely no idea why this error keeps appearing!

Thanks for any help!

Compiler Error Message: BC30390: 'cpncms_v1.evtC alendar.Private Sub
Calendar1_DayRe nder(sender As Object, e As
System.Web.UI.W ebControls.DayR enderEventArgs) ' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgConten t">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Ca lendar1_DayRend er"
OnSelectionChan ged="Calendar1_ SelectionChange d" 'error
Line 59:OnVisibleMon thChanged="Mont hChanged" DayStyle-Height="100"
DayStyle-Width="75" DayStyle-HorizontalAlign ="Left"
Line 60:DayStyle-verticalalign=" Top" DayStyle-Font-Name="Arial"
DayStyle-Font-Size="12" NextPrevFormat= "FullMonth"

...:: CODE
Private Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
DayRenderEventA rgs)
Dim Item As MyDates '//Temporary storage for looping through the
collection
Dim TextColor As String

Dim DayHold As DateTime = "01/01/1900" '//Temporary date to check
for multiple items per day

Dim MultipleItemDay As Boolean = False

'// Set to true if the date is in the collection and needs to be
displayed
Dim DayTextHasChang ed As Boolean = False

'//To build the string for the contents of the table cell
'//I'll use the stingbuilder class instead of concatenation
Dim temp As StringBuilder

If IsNothing(MyCol lection) = True Then
Get_DBItems()
End If

For Each Item In MyCollection
'//The collection is loaded in date order. So, if the date is
different than the DayHold variable
'//And I've already found the right day in the collection, I can
exit the for loop
If DayHold <> Item._Date Then
If DayTextHasChang ed = True Then
Exit For
End If
MultipleItemDay = False
DayHold = Item._Date
Else
MultipleItemDay = True
End If

'//If I've found a date matching the current date...I need to
create the appropriate text
If e.Day.Date = Item._Date.ToSt ring("d") Then
Select Case Item._Type
Case 1 : TextColor = "Blue"
Case 2 : TextColor = "Red"
Case 3 : TextColor = "Orange"
Case 4 : TextColor = "Green"
Case 5 : TextColor = "Brown"
Case 6 : TextColor = "Gray"
Case 7 : TextColor = "#408080"
Case Else : TextColor = "Black"
End Select
If MultipleItemDay = False Then
temp = New StringBuilder '//Create a new stringbuilder
object
Else
temp.Append("<b r>") '//add a seperator to the
stringbuilder
End If
temp.Append("<s pan style=""font-family:Arial;
font-weight:bold;fon t-size:12px; color:")
temp.Append(Tex tColor)
temp.Append(""" ><br>")
temp.Append(Ite m._Title.ToStri ng())
temp.Append("</span>")
DayTextHasChang ed = True '//Set the flag
End If
Next

'//If there was an Item for this day, add the stringbuilder text to
the table cell
If DayTextHasChang ed = True Then
e.Cell.Controls .Add(New LiteralControl( temp.ToString() ))
End If

End Sub
Nov 18 '05 #1
3 1299
What happens if you change Private to Public?

"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:84******** *************** ***********@mic rosoft.com...
Can someone please tell me why I'm getting the following error! I have
absolutely no idea why this error keeps appearing!

Thanks for any help!

Compiler Error Message: BC30390: 'cpncms_v1.evtC alendar.Private Sub
Calendar1_DayRe nder(sender As Object, e As
System.Web.UI.W ebControls.DayR enderEventArgs) ' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgConten t">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Ca lendar1_DayRend er"
OnSelectionChan ged="Calendar1_ SelectionChange d" 'error
Line 59:OnVisibleMon thChanged="Mont hChanged" DayStyle-Height="100"
DayStyle-Width="75" DayStyle-HorizontalAlign ="Left"
Line 60:DayStyle-verticalalign=" Top" DayStyle-Font-Name="Arial"
DayStyle-Font-Size="12" NextPrevFormat= "FullMonth"

..:: CODE
Private Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
DayRenderEventA rgs)
Dim Item As MyDates '//Temporary storage for looping through the
collection
Dim TextColor As String

Dim DayHold As DateTime = "01/01/1900" '//Temporary date to check
for multiple items per day

Dim MultipleItemDay As Boolean = False

'// Set to true if the date is in the collection and needs to be
displayed
Dim DayTextHasChang ed As Boolean = False

'//To build the string for the contents of the table cell
'//I'll use the stingbuilder class instead of concatenation
Dim temp As StringBuilder

If IsNothing(MyCol lection) = True Then
Get_DBItems()
End If

For Each Item In MyCollection
'//The collection is loaded in date order. So, if the date is
different than the DayHold variable
'//And I've already found the right day in the collection, I
can
exit the for loop
If DayHold <> Item._Date Then
If DayTextHasChang ed = True Then
Exit For
End If
MultipleItemDay = False
DayHold = Item._Date
Else
MultipleItemDay = True
End If

'//If I've found a date matching the current date...I need to
create the appropriate text
If e.Day.Date = Item._Date.ToSt ring("d") Then
Select Case Item._Type
Case 1 : TextColor = "Blue"
Case 2 : TextColor = "Red"
Case 3 : TextColor = "Orange"
Case 4 : TextColor = "Green"
Case 5 : TextColor = "Brown"
Case 6 : TextColor = "Gray"
Case 7 : TextColor = "#408080"
Case Else : TextColor = "Black"
End Select
If MultipleItemDay = False Then
temp = New StringBuilder '//Create a new
stringbuilder
object
Else
temp.Append("<b r>") '//add a seperator to the
stringbuilder
End If
temp.Append("<s pan style=""font-family:Arial;
font-weight:bold;fon t-size:12px; color:")
temp.Append(Tex tColor)
temp.Append(""" ><br>")
temp.Append(Ite m._Title.ToStri ng())
temp.Append("</span>")
DayTextHasChang ed = True '//Set the flag
End If
Next

'//If there was an Item for this day, add the stringbuilder text to
the table cell
If DayTextHasChang ed = True Then
e.Cell.Controls .Add(New LiteralControl( temp.ToString() ))
End If

End Sub


Nov 18 '05 #2
I din't slog through all the code you posted, but I can tell you this: That
error occurs when a private member of a class is referenced outside the
class. Private members are not accessible by other classes, nor by inherited
classes.

--
HTH,
Kevin Spencer
..Net Developer
Microsoft MVP
Big things are made up
of lots of little things.

"Tim::.." <myatix_at_hotm ail.com> wrote in message
news:84******** *************** ***********@mic rosoft.com...
Can someone please tell me why I'm getting the following error! I have
absolutely no idea why this error keeps appearing!

Thanks for any help!

Compiler Error Message: BC30390: 'cpncms_v1.evtC alendar.Private Sub
Calendar1_DayRe nder(sender As Object, e As
System.Web.UI.W ebControls.DayR enderEventArgs) ' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgConten t">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Ca lendar1_DayRend er"
OnSelectionChan ged="Calendar1_ SelectionChange d" 'error
Line 59:OnVisibleMon thChanged="Mont hChanged" DayStyle-Height="100"
DayStyle-Width="75" DayStyle-HorizontalAlign ="Left"
Line 60:DayStyle-verticalalign=" Top" DayStyle-Font-Name="Arial"
DayStyle-Font-Size="12" NextPrevFormat= "FullMonth"

..:: CODE
Private Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
DayRenderEventA rgs)
Dim Item As MyDates '//Temporary storage for looping through the
collection
Dim TextColor As String

Dim DayHold As DateTime = "01/01/1900" '//Temporary date to check
for multiple items per day

Dim MultipleItemDay As Boolean = False

'// Set to true if the date is in the collection and needs to be
displayed
Dim DayTextHasChang ed As Boolean = False

'//To build the string for the contents of the table cell
'//I'll use the stingbuilder class instead of concatenation
Dim temp As StringBuilder

If IsNothing(MyCol lection) = True Then
Get_DBItems()
End If

For Each Item In MyCollection
'//The collection is loaded in date order. So, if the date is
different than the DayHold variable
'//And I've already found the right day in the collection, I can exit the for loop
If DayHold <> Item._Date Then
If DayTextHasChang ed = True Then
Exit For
End If
MultipleItemDay = False
DayHold = Item._Date
Else
MultipleItemDay = True
End If

'//If I've found a date matching the current date...I need to
create the appropriate text
If e.Day.Date = Item._Date.ToSt ring("d") Then
Select Case Item._Type
Case 1 : TextColor = "Blue"
Case 2 : TextColor = "Red"
Case 3 : TextColor = "Orange"
Case 4 : TextColor = "Green"
Case 5 : TextColor = "Brown"
Case 6 : TextColor = "Gray"
Case 7 : TextColor = "#408080"
Case Else : TextColor = "Black"
End Select
If MultipleItemDay = False Then
temp = New StringBuilder '//Create a new stringbuilder object
Else
temp.Append("<b r>") '//add a seperator to the
stringbuilder
End If
temp.Append("<s pan style=""font-family:Arial;
font-weight:bold;fon t-size:12px; color:")
temp.Append(Tex tColor)
temp.Append(""" ><br>")
temp.Append(Ite m._Title.ToStri ng())
temp.Append("</span>")
DayTextHasChang ed = True '//Set the flag
End If
Next

'//If there was an Item for this day, add the stringbuilder text to the table cell
If DayTextHasChang ed = True Then
e.Cell.Controls .Add(New LiteralControl( temp.ToString() ))
End If

End Sub

Nov 18 '05 #3

Try redeclaring the Calendar1_DayRe nder procedure as

Public

eg.

Private Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
DayRenderEventA rgs)

should read

Public Sub Calendar1_DayRe nder(ByVal sender As Object, ByVal e As
DayRenderEventA rgs
-
spaldin
-----------------------------------------------------------------------
Posted via http://www.codecomments.co
-----------------------------------------------------------------------

Nov 18 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

4
4522
by: Adriano Coser | last post by:
I'm getting the following error: error C3767: PictureSource - candidate function(s) not accessible when accessing a public member function of a managed class, either from managed or unmanaged code. The class is an owner draw control implemented into a Control Library. The access is on a DLLs that support CLR with old syntax. The code compiled OK on Beta-1.
1
2763
by: Richard | last post by:
I keep getting this error and i dont know how 2 fix it. If someone knows how, please tell me :D Compilation Error Description: An error occurred during the compilation of a resource required to service this request. Please review the following specific error details and modify your source code appropriately. Compiler Error Message: BC30389: 'C' is not accessible in this context because it is 'Private'.
1
8584
by: Dave | last post by:
I am getting te following error in a ASP.Net app that is running on Win XP Pro (SP2): Server cannot access application directory 'C:\Documents and Settings\dave\My Documents\My Visual Studio ASP.NET\MyWebSite\'. The directory does not exist or is not accessible because of security settings. Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information...
7
1696
by: DF | last post by:
DrawText is overloaded - one of which accepts a ByVal rect and the other accepts a ByRef rect. I get a "no accessible 'DrawText' is most specific" error. How can I resolve this problem by forcing VB to recognize the one I want? Any help would be greatly appreciated. DF
0
1062
by: tshad | last post by:
I am getting the following error which makes no sense. No accessible overloaded If you look at the error, there is one overloaded function that can be called (int, string, int, int). The first variable is constant that should work fine as an int and works everywhere else. The second variable is a string.
3
1878
by: tshad | last post by:
I am getting the following error which makes no sense. I am doing this in asp.net. I get the following error: No accessible overloaded If you look at the error, there is one overloaded function that can be called (int, string, int, int). The first variable is constant that should work fine as an int and works everywhere else.
2
3482
by: Iwanow | last post by:
Hello! I have a single class without any inheritance over there, and I get that error on its constructor which is an empty function: LabelProcessor::LabelProcessor() { } The full error message is as follows:
14
2481
by: mlimber | last post by:
In an article on the safe bool idiom (http://www.artima.com/cppsource/safeboolP.html), Bjorn Karlsson gives the following code (slightly modified): class safe_bool_base { protected: typedef void (safe_bool_base::*bool_type)() const; void this_type_does_not_support_comparisons() const {} safe_bool_base() {}
1
5631
by: prash.marne | last post by:
Hi, I am trying open a simple popup window & my code is .. <html> <head> <title>popup_window</title> <script type="text/javascript"> function popup_onclick(){ my_window = window.open("",'windowname','width=400,height=200');
0
9378
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language synchronization. With a Microsoft account, language settings sync across devices. To prevent any complications,...
0
10137
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
9989
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
9812
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
0
8814
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then launch it, all on its own.... Now, this would greatly impact the work of software developers. The idea...
0
5405
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
3914
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
3
3510
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.
3
2788
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating effective websites that not only look great but also perform exceptionally well. In this comprehensive...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.