Geting SharePoint 2010 Multiline Field Value
-
24-05-2021 - |
Pregunta
I am getting multine content type filed value programatically with LINQ To SharePoint. It shows like below
<div class=\"ExternalClass282872C28A554849AA9167214C968756\"><p><a href=\"/_layouts /listform.aspx?PageType=4&ListId={9E248748-4423-4259-9D2C-0A052742660F}&ID=5&ContentTypeID=0x010005F5F3E297E77B439FAEB4658DFAAA6A\"><font color=\"#003759\">
**MyDesired Value**
</font></a></p></div>"
How can i get only value MyDesignedValue
from this field?
Solución
Try SPHttpUtility.ConvertSimpleHtmlToText
For more information see, Fetch a list item to a MultiLine textBox
Otros consejos
string MyString = “<div class=\”ExternalClass282872C28A554849AA9167214C968756\”><p><a href=\”/_layouts /listform.aspx?PageType=4&ListId={9E248748-4423-4259-9D2C-0A052742660F}&ID=5&ContentTypeID=0x010005F5F3E297E77B439FAEB4658DFAAA6A\”><font color=\”#003759\”>MyDesired Value</font></a></p></div>”;
String result = Regex.Replace(MyString, @”<[^>]*>”, String.Empty);
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow