获取SharePoint 2010多行字段值

时间:2012-03-15 21:53:46

标签: sharepoint sharepoint-2010 sharepoint-api

我使用LINQ To SharePoint以编程方式获取多行内容类型字段值。它显示如下

<div class=\"ExternalClass282872C28A554849AA9167214C968756\"><p>​<a href=\"/_layouts    /listform.aspx?PageType=4&amp;ListId={9E248748-4423-4259-9D2C-0A052742660F}&amp;ID=5&amp;ContentTypeID=0x010005F5F3E297E77B439FAEB4658DFAAA6A\"><font color=\"#003759\">

   **MyDesired Value**

</font></a></p></div>"

如何从此字段中仅获取值MyDesignedValue

2 个答案:

答案 0 :(得分:0)

答案 1 :(得分:0)

string MyString = “<div class=\”ExternalClass282872C28A554849AA9167214C968756\”><p><a href=\”/_layouts    /listform.aspx?PageType=4&amp;ListId={9E248748-4423-4259-9D2C-0A052742660F}&amp;ID=5&amp;ContentTypeID=0x010005F5F3E297E77B439FAEB4658DFAAA6A\”><font color=\”#003759\”>MyDesired Value</font></a></p></div>”;

String result = Regex.Replace(MyString, @”<[^>]*>”, String.Empty);