To enable "Show Tool Bar" option in Document Web Part through Code

I am going to explain a scenario where I had an OOB Document Web Part in one of my page and from code i had to enable the “Show Tool Bar” for that Web Part. The scenario can be achieved through reflection. The code is given below. splist -> The Document Library List webpartID -> Id of the Document…


Folders ending with “_files” not getting created in SharePoint, Thicket

I came across a problem few days back where I was not able to create Folders ending with _files and with the name Forms. i.e image_files, Research_files This is by design in SharePoint due to thicket. A thicket is what you get when you save a file as an HTM that contains content such as graphics. To store…


Regular expression to get all the <a> </a> link tags and there value from a string

  hrefLink = “This text will have html + text + a link attribute “;  \\ The below code will get you the content from <a> till </a>. MatchCollection m = Regex.Matches(hrefLink, @”(<a.*?>.*?</a>)”,RegexOptions.Singleline); foreach(Match m1 in m){string value = m1.Groups[1].Value;}