Monday, May 27, 2013

How To Set File Uplod Limit In SharePoint2010

By Default SharePoint2010 provides 50MB files to be upload to the server. If you want to extend upload size to server then you can do it in two ways. Through Central Admin: Navigate Central Admin -> Application Management -> Manage Web Application -> Select your web application -> General Setting. It contains Maximum Upload Size. Configure this to set maximum upload file limit. But you have to take care about the maxAllowedContentLength and maxRequestLength from the web.config file. To update web.config its very harmful if any other...

Saturday, May 25, 2013

Create New Site Collection in the New Content Database in SharePoint2010

If you want to create a new site collection in the specific database, there are several different options available in the SharePoint 2010.From the central administration site, you can create the site collection in the specific database with the following workaround. The downside of this approach is you have to temporarily take down the all the content databases in the given web application except the database where you want to create the new site collection. Create a new content database for the given web application (Central Administration ->...

Friday, May 24, 2013

Add Custom File Attachment Control in the Form of SharePoint

Normally SharePoint provides Document Attachment in the ribbon. But in my case ribbon was hide from the user. So I need to add Attachment Control on the form instead of ribbon. So I achieve it using Client Object Model. Insert the following code in your form to make attachment field available in the Form.<tr> <td rowspan="2" width="190px" valign="top" height="50px">        <H3>             Upload Evidence       ...

Thursday, May 23, 2013

How Value Return in Before Properties, After Properties and ListItem using EventReceiver in SharePoint2010

Event receivers are common in SharePoint development so its better to understand the data available in each events. Sometimes as a developer we jump into coding before thinking about contextual data availability.One more important thing to notice list event receiver  and document library event receiver are different items of contextual data availability.Following Table will give you a clear picture about the contextual data in each events. SharePoint ListEventBefore Properties ReturnsAfter Properties ReturnsListItem ReturnsEvent TypeItem...

Get Field Values in ItemDeleting Event in SharePoint 2010

If you want to get value from a field in ItemDeleting event, you will need to call SPEventProperties.ListItem[“FIELD_NAME”].ToString() method. If you try to get a field value using AfterProperties or BeforeProperties properties, you will get System.NullReferenceException. The reason is these properties are only accessible in ItemUpdating or ItemUpdated events. An example of ItemDeleting event receiver is provider below:try{ string fieldValue = ""; fieldValue = properties.ListItem["FIELD_ID"].ToString();}catch (Exception ex){ properties.Cancel...

Synchronous and Asynchronous Event Handlers

In SharePoint 2010 it is possible to handle events that occur on list items. These types of events come in two types: Synchronous and Asynchronous Event. Synchronous: happens 'before' the actual event, you have the HttpContext and you can show an error message in the browser and cancel the event Asynchronous: happens 'after' the actual event, there's no HttpContext  and you cannot directly show an error message or cancel the eventBy sub-classing Microsoft.SharePoint.SPItemEventReceiver you can override the desired "event" methods. Synchronous:...

Friday, May 17, 2013

How to check member is exist in specific group in SharePoint2010 using javascript

In SharePoint 2010, if you want to check logged in user exists which particular group using javascript as follow:function IsGroupMember(GroupName){     var isGroupMember = false;     $().SPServices(     {          operation: "GetGroupCollectionFromUser",          userLoginName: $().SPServices.SPGetCurrentUser(),          async: false,completefunc: function(xData, Status)      ...

How to hide fields based in selection of radio button using java script

SharePoint generates a HTML code for the New/Edit/Display Page for each created list.Now you have to the following java script code in your desire page to hide the fieldAssume the html code is as follow:<input type="radio" name="Internal Person" id="Person Type" value="ctl001">Internal Person</input> <input type="radio" name="External Person" id="Person Type" value="ctl002" >Invoiced</input>The above code displays 2 radio button. Now you want to hide var newVal = $(':radio[name=Reported By]:checked').val();if (newVal ==...

Friday, May 3, 2013

Getting error while creating a new web app saying "The password supplied with the domainname\username was not correct. Verify that it was entered correctly and try again"

When you create new web application at that time you enter your credential as the system account of the particular Web Application.After that when you update your credential at that time you must have to update your credential in SharePoint also because SharePoint store your credential in SharePoint database.To update your credential in SharePoint Database you must have to pass follow command in command prompt:** Please open command prompt in Administrator mode. cd "C:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\14\BIN"...

Wednesday, May 1, 2013

Make Windows 8 Boot Directly To Desktop

Would you prefer to have Windows 8 bypass the Start Screen and boot straight to the desktop? If so, you can do so using a technique that takes advantage of a feature that is built right into the operating system - no third-party tools required. All you have to do is create a specially configured task that is scheduled to run at log on.In this post, I’ll walk you through the steps required to make Windows 8 boot straight to the desktop using a specially...