I have created the smartform and generated the relevant class using a bat file (using xsd to generate c# class). Then I assigned that created smartform to a particular folder and I created the sample smartforms using the CMS work area.
Is there a way to create a smartform from code behind? I have tried as follows, but it didn't work as expected:
ContentType<root> cData = new ContentType<root>();
cData.SmartForm.EventName = "Conference Event1";
cData.SmartForm.EventDescription = "Test Description";
cData.SmartForm.EventDate = DateTime.Now.AddMonths(2).ToString("yyyy-MM-dd");
ContentTypeManager<root> contentTypeManager = new ContentTypeManager<root>();
contentTypeManager.Add(cData);