I want to change a column type from multiline text to HTML.
I tried this:
string urlRoot = ConfigurationManager.AppSettings["url"].ToString();
SPSite site = new SPSite(urlRoot);
SPList list = site.RootWeb.Lists["Agenda"];
HtmlField htmlField = new HtmlField(list.Fields, "HTML", "NewHTMLField");
SPField fieldInContentType = list.ContentTypes["Agenda"].Fields["Body Intro"];
fieldInContentType = htmlField;
fieldInContentType.Update();
But I got the following exception:
Value does not fall within the expected range
Is it possible to do this?