Take the 2-minute tour ×
SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. It's 100% free, no registration required.

I am exploring on trying to create a custom webpart and I am encountering this error:

In my source, I have a table in which a cell will contain SharePoint:DateTimeControl.

However it will

<asp:Table ID="interviewerAndApplicants" Visible="False" runat="server" Width="50%">
    <asp:TableRow>
        <asp:TableCell>    
            Interview Timeslot:  <SharePoint:DateTimeControl ID="interviewSlot" runat="server" />
        </asp:TableCell>
    </asp:TableRow>
</asp:Table>

The weird thing is, if the SharePoint:DateTimeControl is NOT within a table cell, it displays perfectly in the design. However when it is placed within a cell, it will cause the error: "Error Rendering Control: Object reference not set to an instance of an object" in the designer view.

What exactly am I doing wrong/ missed out on doing? Thanks.

share|improve this question

2 Answers 2

Did you also try to build the table using plain html tags like

    <table><tr><td>

...?

share|improve this answer
    
Nope I didn't. It's a school project and we are kinda not allowed to use html tags. Though I don't see how html tags will help in this case? –  lyk Mar 28 '13 at 12:34

Control's(interviewerAndApplicants) visible property is set to false. Set it to true and then try.

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.