var item = SPContext.Current.List.Items.Add();
item["ContentTypeId"] = SelectedCurrentType.Id;
item["SomeField"] = ...
//make some fields changes
item.Update();
But when i created this item i get a folder with all fields. in list view there is no
<a onfocus="OnLink(this)" href="/.../Lists/.../AllItems.aspx?RootFolder=%2F..%2FLists%2F..%2F..&FolderCTID=0x0100CBE0798399&View={D1DDC726-FC9C-40D3-A07B-5EAFE2286C66}" onclick=" javascript:EnterFolder("/.../Lists/.../AllItems.aspx?RootFolder=" + escapeProperly("/.../Lists/.../...") + '&FolderCTID=0x0100CBE079839FA443AB3C64E9BA763E776AC0FD9&View={D1DDC726-FC9C-40D3-A07B-5EAFE2286C66}');return false;">Test</a>
and on the ribbon in section Actions i've got a button "Open"
what's wrong? how can i fix this?
the answer is
<SharePoint:CreatedModifiedInfo ControlMode="Display" runat="server"/>
actually don't know why, but this control makes custom form weird. So the solution is remove this control from custom new form