.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Query Sharepoint list, rich text columns returning HTML tags

Posted By:      Posted Date: September 06, 2010    Points: 0   Category :Sql Server
Hi! So I have an issue that maybe someone of you have encountered as well. I am querying a Sharepoint list and creating a report from the data collected from this list. This all works fine except that one of the columns in this list is of the type "Multiple lines of text" and also supports "rich text" with different fonts, sizes and so on. This has the effect that the text returned from this column is wrapped in HTML tags that specifies how the text should be formatted. Naturally I do not want this HTML code to appear in my report so for now I have used custom code to do a string.replace and replaced for example <div></div> and <br> with "". However, this column also has url references to documents and these links shows up like this "/servername/site/subsite/Gemensamma%20dokument/Mwh.docx">http://servername/site/subsite/Gemensamma%20dokument/Mwh.docx There is some sort of double reference to the document that I guess like the HTML tags are embedded in the answer from the rich text column and this is not so easy to do a string replace on because the url varies with the different document and document names. My question really is if anyone of you have done a similar report that I am doing, and have encountered this fenomen with this sharepoint column and how you did to solve this? I have tried to creat

View Complete Post

More Related Resource Links

How to join two sharepoint list in c# by CAML query?

Hii All,
   I am using wss 3.0 and i have one site and site has 4 to 5 lists. lists are interconnected with lookup column and same column. I need to display some column fron one list and some from another.. i need to join that lists by where condition like project =project..

So how can i join??

Thank You

Creating List Definitions with Custom List Columns for SharePoint Server 2007

Learn to use Visual Studio 2008 Extensions for Windows SharePoint Services to create a SharePoint list definition that implements custom list columns.

How to read a column of a sharepoint list to a text string field of infopath form?

My infopath form used to read these email addresses from a web service and web.config file. Now i would like to get these user email addresses from a contact list in a sharepoint server. I am trying to do this without writing any codes. Here is what i have done so far: 1. Adding a new "data connection to receive data from SharePoint library or List" where i selected Email Address column of the contact list. 2. I added a new Text Field and define a new rule with "Query using a data connection" defined above. When i try to access the newly created Text field above it always return empty as if the Query attached to it did not executed at all. What did i do wrong? Is there a better way? Thank you in advance for your help.

Cross list query for two sharepoint lists and a join between the fields

Hello All, I have a requirement where i need to query the data from two  sharepoint lists  on a same site by doing a join between those lists and get the result into datatable.I am doing this using sharepoint object model.Is there any possibility to do this. Any pointers in the right direction are greatly appreciated. Thank you Smith   smith

How to eliminate html tags from text boxes

Hi all,   In my application I am using a login screen. While a new user registers he has to fill the First name and Last name. There is a user search option. The details of the users will be shown in the user details page. Some users try to add html tags like </td></tr> with first name and last name. So after rendering from DB the page alignment is breaking.   How to fix this problem??   How can I avoid html tags while entering the user details?   Please give me a solution:-   Thank You  

Remove Word Style once copy and paste content to Rich text Editor in sharepoint 2010

Hi Guys, I have page layout for Users to add content for Page.I have site column for page content on field type HTML with Richtextmode="FUll Html". Now when user cut and paste content from Word document in this Field it carry word document style. how can i control this content on Page layout with CSS. Please adviseThanks Ron

Rich text field showing html code

I am an end user of Sharepoint. This issue only happens from my computer, not from any other within our organization. What happens is that when I edit an item in Sharepoint that contains a rich text field, HTML code is showing. Like so: <div class=ExternalClassC900CFF4F2BF4312A89133C01A6E3C96> Some text</div> This happens from any web browser. Sharepoint 2007 is used. I have Windows 7 x64. Any idea what is causing this?

SharePoint 2010 Rich Text Editor field

I want to embed iframe tag in Sharepoint 2010 rich html text editor control, but it is simply remove the tags when i save the content. Please let me know how can i do this?

Rich Text in list forms & date picker

Hi, I was hoping that someone could help me on a few issues. I have created a custom list form in sharepoint designer to display the contents of my list in a nice format. I have also customised the edit form for the list. I am having a problem with special characters now showing up when they are being entered (the HTML does not seem to be parsed on the output). I would like to make a description field in my list edit form a rich text box, is this possible? This is the code I am using at the moment for the text box: <asp:TextBox runat="server" id="ff5{$Pos}" text="{@status}" textmode="multiline" __designer:bind="{ddwrt:DataBind('u',concat('ff5',$Pos),'Text','TextChanged','ID',ddwrt:EscapeDelims(string(@ID)),'@status')}" Width="600px" Height="100px" /> And this is the code that I am using on the display side of the list to show the status update: <xsl:value-of disable-output-escaping="yes" select="ddwrt:AutoNewLine(string(@status))" /> Is there code that I can use on the data entry side that will show a rich text box? Also then I will need to change the tag on the display end so it parses the HTML? In addition to this, is there specific code for a 'date picker' ? At the moment my date entry box is just a standard text box, is there code I can u

Lookup columns in a SharePoint Custom list

Hi, I would like to know the maximum lookup columns we can create in a SharePoint Custom list. Thanks and regards, Usha   

Reading WPF rich text box content in HTML format

Hi, I am using WPF RichTextBox. From that, I am reading the content in RTF format using the following code. TextRange textRange = new TextRange(paramRichTextBox.Document.ContentStart, paramRichTextBox.Document.ContentEnd); MemoryStream msData = new MemoryStream(); textRange.Save(msData, DataFormats.Rtf); //get the data from the selected range //strData = textRange.Text; strData = ASCIIEncoding.Default.GetString(msData.ToArray()); I also found that there is an option called DataFormats.HTML. Hence, I tried using this but ended up with error. Is there any other way to read the content of RichTextBox in HTML format? Thanks in Advance!!! Best Regards, Subalakshmi Vijayarajan.

update list text or date value via sharepoint designer using JAVA


Hi All,

Bit of a noob question - but tried all sorts and can't get this to work - also first time i've ever used sharepoint.

(I'm using sharepoint designer 2007) I have a form, on the form i select a type (drop box choice) and it hides or displays a related field, I want to auto populate the field when it displays, below is the java i have currently. 

Please advise how to populate (date field) with tommorows date, and also if it was a text field with the word "testdre"

<script type="text/javascript">
  function hideFieldsOnStart()
   //hide the control at start
   var control = getTagFromIdentifierAndTitle("input","TextField","Urgent Change Justifacation");
   //add an onchange event to the dropdown
   getTagFromIdentifierAndTitle("select","DropDownChoice","Change Type").onchange = function() {ChangeEvent()};
  function ChangeEvent()
   //get the dropdown

SharePoint List Query Filter


I am writting an SSRS report where I am querying a SharePoint list and trying to filter the data through the CAML query.  In BIDS, the query returns data, but the filter where clause doesn't seem to be getting recognized as I get all of the data back.  The where clause does seems to work in the U2U CAML Query Builder tool.

Can anyone please give advice as to why my where clause isn't working?


   <Method Namespace="http://schemas.microsoft.com/sharepoint/soap/" Name="GetListItems">
         <Parameter Name="listName">
                   <DefaultValue>Subscribe - Sales by Product Group - Wheel</DefaultValue>

Search data from sharepoint list and populate repeating table (Seach text should be entre in first f


Hi All,

I am newbie to infopath.

I have assignment to search data from sharepoint list and display it to repeating table. Below is the case in detail.

i. User enter search text in first textbox of repeating table.

ii. After text enter you will Enter or click tab button.

iii. As user press Tab /Enter, the other textboxes of repeating table will populate with data automatically.

iv. If searched data rows are more then one, then dynamically add new row's in repeating table and  show searched data.

I am working at offical assignment and it's deadline is very tough. i had made extensive search at google and msdn forum but unable to accomplish. I would appreciate and thanks is some provide me solution in form to a small infopath application and code snippet.




WCF returning "The content type text/html of the response message does not match the content type of

I have a WCF service I am trying to run on a new installation of 64-bit Windows Server 2008 IIS. Although it runs fine on Windows 2003 IIS, it is throwing the error in the thread title, which appears to be a server config issue, but I am not sure. Googling and searching the MSDN forums did not turn up a solution. I tried running WCF Logging, but that didn't help either.

Does anyone have any suggestions on how to solve this probelm?

Here is the error:

The content type text/html of the response message does not match the content type of the binding (application/soap+xml; charset=utf-8). If using a custom encoder, be sure that the IsContentTypeSupported method is implemented properly. The first 1024 bytes of the response were: '<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<meta http-equiv="Content-Type" content=&qu

enhanced rich text html


Hi, is there any documentation about what specific html tags and attributes may be generated in rich text and enhanced rich text fields?

my blog - Tea Time with Meowkins

Auto Populating SharePoint List Columns based on value in one column

   I have a SharePoint List where I want to auto populate the value of some of the columns from another List based on a field "Title" which is primary & unique....
   I want to auto populate them when clicking "New Item"  and entering data... you put the "Title" value and it should match the Title value from another List and auto-populate some the columns...

   Please any idea would be highly appreciated....

Thanks in advance

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend