Can't create DateTime Control in Table Cell of Sharepoint 2016 VisualWebPart (Visual Studio 2017).
Error message for Table1: "Object reference not set to an instance of an object"
Code of VisualWebPart1UserControl.ascx:
<asp:Table ID="Table1" runat="server">
...
<asp:TableCell runat="server" BorderColor="#7700FF">
<SharePoint:DateTimeControl ID="DateTimeControl1" runat="server" />
</asp:TableCell>
Error message for Table1: "Object reference not set to an instance of an object"
Code of VisualWebPart1UserControl.ascx:
<asp:Table ID="Table1" runat="server">
...
<asp:TableCell runat="server" BorderColor="#7700FF">
<SharePoint:DateTimeControl ID="DateTimeControl1" runat="server" />
</asp:TableCell>