Second Life of a Hungarian SharePoint Geek


Péter Holpár is a .NET architect and developer working with Microsoft technologies in the past thirteen (or more?) years. He is specialized in SharePoint development, having deep hands-on experience with all of the versions beginning with the beta version of SharePoint 2001 (Tahoe) up to the current SharePoint 2013 version.



  1. Péter,

    I have a question about managed metadata. Do you have any recommendations for the best way to set up a web part that will display all of the pages in the page library that have the same tag(s) as the current page?

    Thank you!

    Comment by Joseph Caporale — September 15, 2010 @ 22:25

  2. I saw one your MSDN posts where you have mentioned about ListFieldIterator.ListItem.Update not updating the correct content type.

    I am in a similar situation :(, your help will be greatly appreciated…

    I have a document library where I have added 3 custom content types. For each of the custom content types, custom edit forms have been written with ListFieldIterators. I also have given a Custom DropDown in that form for the user to select the Content Type. When the user selects the Content Type, I load the Edit Form again with that Content Type’s ID in the QueryString. Now all is well, till the Save method is called – where the ListFieldIterator.ListItem.Update() updates the item with the default content type and not the one selected by the user in the dropdown. Strangely, for any non MS Office filetypes like pictures or PDF files, it works fine!

    When I debugged, till the ListFieldIterator.ListItem[“Content Type ID”] is updated, it is fine, I mean the ListItem object reflects the changed content type, but after it has hit the update, it changes….

    I have been breaking my head over this, so any help would be really appreciated!


    Comment by Karthick — January 22, 2011 @ 19:09

    • Hi Karthick,

      I cannot test it now, but as far as I remember, you have to update the Item, and not the ListItem after setting the CT on the ListItem. Something like this:
      listFieldIterator.ListItem[“ContentTypeId”] = yourCTID;

      Hope it helps,

      Comment by Peter Holpar — January 30, 2011 @ 21:15

  3. Hi Peter,

    I know that you must have some experience with this one. I am trying to send a character string “Ø36” to Sharepoint using Webclient in Silverlight and API UploadStringAsync or OpenWriteAsync. The actual string ends up being “Ø36” after HTML encoding. This string is actually part of an XML tag, let’s say Ø36.

    Using either of the Webclient methods, something changes the string so that viewing the resulting file in SharePoint shows ?36.

    Maybe it is a problem something like:

    I have tried:

    wc.Headers[HttpRequestHeader.ContentType] = “text/html; charset=utf-8”;


    wc.Encoding = UTF8Encoding.UTF8;

    but nothing seems to work.

    Do you have any idea where I can look to find out what to do?

    Any help would be greatly appreciated.



    Comment by Dave — March 20, 2012 @ 10:22

  4. Oops it should say the actual string ends up being ampersand, hash, 216 semicolon after HTML encoding.


    Comment by Dave — March 20, 2012 @ 10:24

    • It’s not clear to me what SP API you use as target of your WebClient calls, and where this string appears in the request. Would be nice to know more on your goals as well.

      Comment by Peter Holpar — April 9, 2012 @ 20:51

  5. Hi Peter,

    I’ve got a question on your code sample that I found here:

    I’ve managed to add the delete, update and create operations. But only the delete method works on the external list, do you have any examples of update and create operations using the same code above? Thanks

    Comment by Khem — February 25, 2013 @ 02:30

  6. Peter, Thank you for your work and sharing your knowledge. The project SampleTaskList is incredible. It is just incredible. Thank you.

    Comment by Vlakov — July 12, 2013 @ 02:50

  7. Hi Peter,

    i add a ListFieldIterator control to a sharepoint webpart page, when i try to change the list id and control mode of it, it doesn’t updated, i call the databind method after changing the list id but still not changed, any help

    Thank you

    Comment by Patrick — January 14, 2015 @ 09:44

RSS feed for comments on this post. TrackBack URI

Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s

Blog at

%d bloggers like this: