I have a user control I'm using to edit new list items. In my Page_Load event, I am trying to retrieve the Content Type of the new item to use in further logic. But, I'm getting a null reference when I try to reference the content type. Am I going about this wrong? Here's my code:
protected void Page_Load(object sender, EventArgs e)
{
SPContext context = SPContext.Current;
SPListItem currentItem = context.ListItem;
SPContentType currentCType = currentItem.ContentType;
// Do some other logic
}