Asked by:
Compilation error->BC30456: 'Calendar1_DayRender' is not a member of 'ASP.calendario_aspx'

Question
-
User2021140201 posted
Hi,
I am deploying a web page (iis 5.1 over Windows XP). For that I directly click on "Publish Web Site" in the "Build" menu of Visual Studio 2005. Normally once published the page works fine, but sometimes it started to give me an error in a page with 12 calendars on it. The funny thing is that without doing nothing and after a while the page start to work fine. I do not know if I am missing something?.
Thanks,
Jaime
The 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: BC30456: 'Calendar1_DayRender' is not a member of 'ASP.calendario_aspx'.
Source Error:
Line 91: <tr> Line 92: <td style="width: 100px; height: 182px;"> Line 93: <asp:Calendar ID="Calendar1" runat="server" BackColor="White" BorderColor="#999999" Visible="False" Line 94: CellPadding="4" DayNameFormat="Shortest" Font-Names="Verdana" Font-Size="8pt" Line 95: ForeColor="Black" Height="180px" ShowNextPrevMonth="False" Width="180px" OnDayRender="Calendar1_DayRender" OnSelectionChanged="Calendar1_SelectionChanged">
Saturday, December 2, 2006 4:00 AM
All replies
-
User-1683291434 posted
Hi,
this error basically says that you have defined in the asp code
OnDayRender="Calendar1_DayRender"
function Calendar1_DayRender, to handle the DayRender event of the Calendar control.
But this function is to found in the code behind class.
So probably you have renamed it in the code behind class, and forgot to rename it in the asp file ?
Or you could have changed the signature of the method to , to accept other arguments.
Cheers,
Yani
Saturday, December 2, 2006 6:43 AM -
User2021140201 posted
Thanks,
Yani my problem is that after I published the page, sometimes it works and sometimes it give me the above error. I think it is nothing about the code (since it works perfectly in visual studio 2005 and most of the time it works perfectly once i published it), I think is something relate with how I published the web (actually I used publish web option in Visual studio 2005) or with iis 5.
Any help?.
Thanks.
Jaime
Saturday, December 2, 2006 6:59 AM -
User-1683291434 posted
Could you paste some code of the code behind class ?
Yani
Saturday, December 2, 2006 8:42 AM -
User2021140201 posted
Yes,
This is the code behind:
Protected
Sub Calendar1_DayRender(ByVal sender As Object, ByVal e As System.Web.UI.WebControls.DayRenderEventArgs)CalendarDayRenderAppliedFormat(e, 1)
End SubProtected
Sub Calendar1_SelectionChanged(ByVal sender As Object, ByVal e As System.EventArgs)CalendarSelectionChanged(
Me.Calendar1) End SubThanks,
Jaime
Saturday, December 2, 2006 9:51 AM