Hello,
You can use the following code to get the temlate ID:
CMS.DataEngine.GeneralConnection conn = CMS.DataEngine.ConnectionHelper.GetConnection();
CMS.DataEngine.ClassStructureInfo SI = CMS.DataEngine.ClassStructureInfo.GetClassInfo("cms.document", conn);
Literal1.Text =SI.DataClassInfo.ClassDefaultPageTemplateID.ToString();
The string "cms.document" is the code name of the document type.
Best regards,
Boris Pocatko