SharePoint

Retrieve items from a particular folder of a list

There are times when we need to fetch only the items within a specific folder. In those cases we can use the ‘Folder’ property of SPQuery class. Simply set the ‘Folder’ property to a Folder object

event_note
close

There are times when we need to fetch only the items within a specific folder. In those cases we can use the ‘Folder’ property of SPQuery class. Simply set the ‘Folder’ property to a Folder object

Read more

Posted in Code behind
SharePoint

Attach and Detach Event Receiver Programmatically C#

Recently i came up with an issue with an SP 2007 requirement, where I was updating records using a visual web part. But due to an event receiver deployed by another vendor, the records were

event_note
close

Recently i came up with an issue with an SP 2007 requirement, where I was updating records using a visual web part. But due to an event receiver deployed by another vendor, the records were

Read more

Posted in Code behind
SharePoint

Get File Content SharePoint using external applications

This blog post explains on how to get file content from SharePoint using external applications basically other programming languages. Although the below code is in C#, i am sure you will figure out how to

event_note
close

This blog post explains on how to get file content from SharePoint using external applications basically other programming languages. Although the below code is in C#, i am sure you will figure out how to

Read more

Posted in Code behind
SharePoint

Connect to SharePoint On Premise using external applications

I was having a tough time searching on the internet on how to connect to SharePoint On Premise from an external application. Now as you all know, we need to first authenticate ourselves in SharePoint,

event_note
close

I was having a tough time searching on the internet on how to connect to SharePoint On Premise from an external application. Now as you all know, we need to first authenticate ourselves in SharePoint,

Read more

SharePoint

Get My Checked Out Files from Site Collection using SPSiteDataQuery

So i get this task of getting the checked out files of the current user from all the subsites of a site collection. To tackle this, something called as SPSiteDataQuery came in my mind. And

event_note
close

So i get this task of getting the checked out files of the current user from all the subsites of a site collection. To tackle this, something called as SPSiteDataQuery came in my mind. And

Read more

Posted in Code behind
SharePoint

Custom Server Header

So recently I was given the task to handle all the security related aspects of the portal which we developed in SharePoint, one of which was replacing the Server Header of IIS. Now the Server header

event_note
close

So recently I was given the task to handle all the security related aspects of the portal which we developed in SharePoint, one of which was replacing the Server Header of IIS. Now the Server header

Read more

Posted in Code behind
SharePoint

Pagination using SPQuery C#

There is something you really need to know, YOU CAN DO PAGINATION USING SPQUERY!!!!!!!! Yes, below is the code i have implemented

  Reference URLs: http://blogs.msdn.com/b/colbyafrica/archive/2009/02/19/learning-sharepoint-part-vi-list-pagination.aspx https://code.msdn.microsoft.com/office/CSSharePointPaginationWebPa-b44c8073/sourcecode?fileId=61645&pathId=1225843244 http://www.tekritisoftware.com/implement-paging-using-caml-query-sharepoint2010  

event_note
close

There is something you really need to know, YOU CAN DO PAGINATION USING SPQUERY!!!!!!!! Yes, below is the code i have implemented

  Reference URLs: http://blogs.msdn.com/b/colbyafrica/archive/2009/02/19/learning-sharepoint-part-vi-list-pagination.aspx https://code.msdn.microsoft.com/office/CSSharePointPaginationWebPa-b44c8073/sourcecode?fileId=61645&pathId=1225843244 http://www.tekritisoftware.com/implement-paging-using-caml-query-sharepoint2010  

Read more

Posted in Code behind
SharePoint

Dynamic CAML Query using C#

So i had a requirement where i had to create a CAML query dynamically based on user inputs, after googling, i found some solutions, but this helped be Reference url: https://shahjinesh11.wordpress.com/2013/12/26/how-to-create-caml-query-dynamically-in-sharepoint/

Now, you can prepare

event_note
close

So i had a requirement where i had to create a CAML query dynamically based on user inputs, after googling, i found some solutions, but this helped be Reference url: https://shahjinesh11.wordpress.com/2013/12/26/how-to-create-caml-query-dynamically-in-sharepoint/

Now, you can prepare

Read more

Posted in Code behind
SharePoint

Custom TextBox Server Control with Regular Expression Validator

In my recent projects, there was a flaw in our code, script injections were being made possible through Text Box. There was a client requirement that tags if present in the Text Box, it should

event_note
close

In my recent projects, there was a flaw in our code, script injections were being made possible through Text Box. There was a client requirement that tags if present in the Text Box, it should

Read more

Posted in Code behind
SharePoint

Remove HTML Tags from ASP Controls in a Visual Webpart

Lets say for example you have a text box with which you store certain text in a SharePoint List and while displaying the data to users, you make use of a label. Now i add

event_note
close

Lets say for example you have a text box with which you store certain text in a SharePoint List and while displaying the data to users, you make use of a label. Now i add

Read more

Posted in Code behind