2

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.

1

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

    <table><tr><td>

...?

| 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
1

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

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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