using System;
using System.Data;
using System.Configuration;
using System.Collections;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Web.UI.HtmlControls;
using System.Collections.Generic;
using System.Data.SqlClient;
using System.Text;
public partial class JFMaster : System.Web.UI.MasterPage
{
protected void Page_Load(object sender, EventArgs e)
{
CalendarManager.DatesCollection = CalendarManager.GetEvents();
}
protected void calLeftNav_SelectionChanged(object sender, EventArgs e)
{
if (IsPostBack)
Session["SessDate"] = calLeftNav.SelectedDate.ToShortDateString();
Response.Redirect("~/DayView.aspx");
}
protected void calLeftNav_OnDayRender(object sender, DayRenderEventArgs e)
{
foreach (CalendarManager.DatesColl DatesTimes in CalendarManager.DatesCollection)
{
if (e.Day.Date >= DatesTimes.StartDate && e.Day.Date <= DatesTimes.EndDate)
{
e.Cell.BackColor = System.Drawing.Color.FromArgb(254, 233, 168);
}
}
}
}
que está chamando uma outra classe, detalhe isso é um calendário de compromisso estilo outlook.
No visual estudio roda tranquilo, mas quando coloco no servidor da o seguinte error
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: CS0103: The name 'CalendarManager' does not exist in the current context
Source Error:
Line 18: protected void Page_Load(object sender, EventArgs e)
Line 19: {
Line 20: CalendarManager.DatesCollection = CalendarManager.GetEvents();
Pergunta
rdf2806
Bom pessoal, se alguém pode me ajudar ficaria muito agradecido.
bom é o seguinte, tenho uma aplicação asp.net e dentro dela uma master page:
<%@ Master Language="C#" AutoEventWireup="true" CodeFile="JFMaster.master.cs" Inherits="JFMaster" %> <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd"> <html xmlns="http://www.w3.org/1999/xhtml" > <head id="Head1" runat="server"> <script src="Scripts/Functions.js" language="javascript" type="text/javascript"></script> </head> <body> <form id="JFForm" runat="server"> <table cellpadding="0" cellspacing="0" width="100%" border="0"> <tr> <td colspan="3" style="background-color:#BFDBFF;"> <table cellspacing="0" cellpadding="0" border="0" width="100%"> <tr> <td style="text-align: left"> </td> </tr> </table> </td> </tr> <tr> <td class="LeftSide" style="width:200px;"> <table cellpadding="0" cellspacing="0" border="0" width="200"> <tr> <td class="Tab" onmouseover="this.className='TabOver'" onmouseout="this.className='Tab'" onclick="window.location.href='Default.aspx'"> <table cellspacing="0" cellpadding="0" border="0"> <tr> <td style="padding-right: 5px"><asp:Image runat="Server" ID="imgFileCalendar" SkinID="imgFileCalendar" /></td> <td>Calendário</td> </tr> </table> </td> </tr> <tr> <td style="height: 200px; text-align: center"> <asp:Calendar ID="calLeftNav" BorderStyle="none" BorderWidth="0" runat="server" SkinID="SmallCalendars" Width="100%" Height="200" OnSelectionChanged="calLeftNav_SelectionChanged" OnDayRender="calLeftNav_OnDayRender" /> </td> </tr> <tr> <td> <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" CellPadding="0" Width="248px" DataKeyNames="TaskId" DataSourceID="objTasks" ShowHeader="false" GridLines="none"> <Columns> <asp:TemplateField> <ItemTemplate> <div class="GridviewTaskItem"> <table border="0" cellpadding="0" cellspacing="0" style="width: 100%"> <tr> <td align="left" width="25"><asp:Image runat="server" ID="imgTask" SkinID="imgTaskIcon" /></td> <td align="left" width="125"><asp:Hyperlink runat="server" ID="HypTask" NavigateUrl='<%# Eval("TaskId", "~/TaskView.aspx?TaskId={0}")%>' Text='<%# Eval("Subject")%>' /></td> <td align="left" width="73"><%#Eval("StartOn", "{0:d}")%></td> <td align="left" width="25"><asp:Image ID="Image1" runat="server" ImageUrl='<%# CalendarCommon.CheckTaskFlag(Eval("DueOn").ToString()) %>' /></td> </tr> </table> </div> </ItemTemplate> </asp:TemplateField> </Columns> </asp:GridView> </td> </tr> </table> </td> <td class="DivideStyle"><asp:Image ID="imgBlank" runat="server" Width="4" SkinID="imgBlank" /></td> <td class="Content"> <asp:contentplaceholder id="JFContent" runat="server"/> </td> </tr> </table> <asp:ObjectDataSource ID="objTasks" runat="server" SelectMethod="GetTasks" TypeName="TaskManager" /> </form> </body> </html>com o arquivo .csusing System; using System.Data; using System.Configuration; using System.Collections; using System.Web; using System.Web.Security; using System.Web.UI; using System.Web.UI.WebControls; using System.Web.UI.WebControls.WebParts; using System.Web.UI.HtmlControls; using System.Collections.Generic; using System.Data.SqlClient; using System.Text; public partial class JFMaster : System.Web.UI.MasterPage { protected void Page_Load(object sender, EventArgs e) { CalendarManager.DatesCollection = CalendarManager.GetEvents(); } protected void calLeftNav_SelectionChanged(object sender, EventArgs e) { if (IsPostBack) Session["SessDate"] = calLeftNav.SelectedDate.ToShortDateString(); Response.Redirect("~/DayView.aspx"); } protected void calLeftNav_OnDayRender(object sender, DayRenderEventArgs e) { foreach (CalendarManager.DatesColl DatesTimes in CalendarManager.DatesCollection) { if (e.Day.Date >= DatesTimes.StartDate && e.Day.Date <= DatesTimes.EndDate) { e.Cell.BackColor = System.Drawing.Color.FromArgb(254, 233, 168); } } } }que está chamando uma outra classe, detalhe isso é um calendário de compromisso estilo outlook.
No visual estudio roda tranquilo, mas quando coloco no servidor da o seguinte error
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: CS0103: The name 'CalendarManager' does not exist in the current context
Source Error:
Line 18: protected void Page_Load(object sender, EventArgs e)
Line 19: {
Line 20: CalendarManager.DatesCollection = CalendarManager.GetEvents();
Line 21: }
Line 22:
Source File: e:\HTDOCS\WEB\rodolfo\Novo\Fontes\EPM\processos\calendario\JFMaster.master.cs Line: 20
se alguém pode me ajudar, ou já passou por isso e tem uma ideia de como resolver ficaria muito grato!
Att.
Rodolfo Ferreira de Oliveira
Link para o comentário
Compartilhar em outros sites
3 respostass a esta questão
Posts Recomendados
Participe da discussão
Você pode postar agora e se registrar depois. Se você já tem uma conta, acesse agora para postar com sua conta.