0
SPContentTypeCollection ctc=web.ContentTypes;
string id = string.Empty;
foreach (SPContentType item in ctc)
{
if (string.Equals(item.Group.ToString(),"Custom CT"))
{
id = item.Id.ToString();
break;
}
id = item.id.tostring()
이 작동하지 않는 이유는 무엇입니까? if 문에 문제가 있습니다.그룹 이름으로 콘텐츠 유형 목록 표시
작업하지 않음으로써 의미하는 것을 정교하게 설명 할 수 있습니까? 오류가 발생 했습니까? 아니면 올바른 ID를받지 못하고 있습니까? –
Brian, "Custom CT"에 철자가 잘못되었습니다. 그래서 코드가 좋다. – Claudia