search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

Element is not a known element

Asked by BillC
8 years ago.

I've downloaded the most recent version and started a new project to play with the controls. I've added a reference to the DLL and added it to my toolbox.

After dragging the DayPilotScheduler (or DayPilotCalendar) into the webform, intellisense tells me that they are not a known element.

Rebuilding the project changes nothing, and the build is successful--no errors. The intellisense error mentions not having a web.config, but there is one.

Rendering the page results in a similar error: Unknown server tag 'DayPilot:DayPilotScheduler'.

Version Information: Microsoft .NET Framework Version:4.0.30319; ASP.NET Version:4.0.30319.34280

Here is the code:

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="WebForm1.aspx.cs" Inherits="daypilot.WebForm1" %>

<%@ Register assembly="DayPilot" namespace="DayPilot.Web.Ui" tagprefix="DayPilot" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<DayPilot:DayPilotScheduler runat="server"></DayPilot:DayPilotScheduler>
</div>
</form>
</body>
</html>

My .net and Visual Studio experience is slim so I must be missing something somewhere. There is nothing but normal template in the code-behind.

Comment posted by BillC
8 years ago.

I should have pointed out that this is the lite version I'm testing before recommending the PRO version to the team I'm working with.

Answer posted by Dan Letecky [DayPilot]
8 years ago.

There are two requirements for the IntelliSense to work:

1. The DayPilot.dll must be referenced and reachable.
2. The "DayPilot" prefix must be registered - either in the page header or in web.config. Normally it's in the page header and it looks like this:

<%@ Register Assembly="DayPilot" Namespace="DayPilot.Web.Ui" TagPrefix="DayPilot" %>

If you drag the control to your web form from the Toolbox both these things should be done automatically.

Sometimes the error message still appears - in that case restarting Visual Studio can help. However, it shouldn't cause any other problems - it should be possible to compile and run the project without problems.

Let me know if the issue persists.

This question is more than 1 months old and has been closed. Please create a new question if you have anything to add.