473,395 Members | 1,554 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

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.evtCalendar.Private Sub
Calendar1_DayRender(sender As Object, e As
System.Web.UI.WebControls.DayRenderEventArgs)' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgContent">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Calendar1_DayRender"
OnSelectionChanged="Calendar1_SelectionChanged" 'error
Line 59:OnVisibleMonthChanged="MonthChanged" 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_DayRender(ByVal sender As Object, ByVal e As
DayRenderEventArgs)
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 DayTextHasChanged 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(MyCollection) = 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 DayTextHasChanged = 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.ToString("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("<br>") '//add a seperator to the
stringbuilder
End If
temp.Append("<span style=""font-family:Arial;
font-weight:bold;font-size:12px; color:")
temp.Append(TextColor)
temp.Append("""><br>")
temp.Append(Item._Title.ToString())
temp.Append("</span>")
DayTextHasChanged = True '//Set the flag
End If
Next

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

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

"Tim::.." <myatix_at_hotmail.com> wrote in message
news:84**********************************@microsof t.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.evtCalendar.Private Sub
Calendar1_DayRender(sender As Object, e As
System.Web.UI.WebControls.DayRenderEventArgs)' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgContent">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Calendar1_DayRender"
OnSelectionChanged="Calendar1_SelectionChanged" 'error
Line 59:OnVisibleMonthChanged="MonthChanged" 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_DayRender(ByVal sender As Object, ByVal e As
DayRenderEventArgs)
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 DayTextHasChanged 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(MyCollection) = 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 DayTextHasChanged = 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.ToString("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("<br>") '//add a seperator to the
stringbuilder
End If
temp.Append("<span style=""font-family:Arial;
font-weight:bold;font-size:12px; color:")
temp.Append(TextColor)
temp.Append("""><br>")
temp.Append(Item._Title.ToString())
temp.Append("</span>")
DayTextHasChanged = True '//Set the flag
End If
Next

'//If there was an Item for this day, add the stringbuilder text to
the table cell
If DayTextHasChanged = 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_hotmail.com> wrote in message
news:84**********************************@microsof t.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.evtCalendar.Private Sub
Calendar1_DayRender(sender As Object, e As
System.Web.UI.WebControls.DayRenderEventArgs)' is not accessible in this
context because it is 'Private'.

Source Error:

Line 56: <td class="pgContent">
Line 57: <!-- Start Calender -->
Line 58: <asp:calendar id="Calendar1" OnDayRender="Calendar1_DayRender"
OnSelectionChanged="Calendar1_SelectionChanged" 'error
Line 59:OnVisibleMonthChanged="MonthChanged" 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_DayRender(ByVal sender As Object, ByVal e As
DayRenderEventArgs)
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 DayTextHasChanged 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(MyCollection) = 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 DayTextHasChanged = 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.ToString("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("<br>") '//add a seperator to the
stringbuilder
End If
temp.Append("<span style=""font-family:Arial;
font-weight:bold;font-size:12px; color:")
temp.Append(TextColor)
temp.Append("""><br>")
temp.Append(Item._Title.ToString())
temp.Append("</span>")
DayTextHasChanged = True '//Set the flag
End If
Next

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

End Sub

Nov 18 '05 #3

Try redeclaring the Calendar1_DayRender procedure as

Public

eg.

Private Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As
DayRenderEventArgs)

should read

Public Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As
DayRenderEventArgs
-
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
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...
1
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...
1
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...
7
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...
0
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...
3
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...
2
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...
14
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...
1
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 =...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
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,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
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...
0
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,...

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.