Dec 9, 2011

Integrating Twitter and FaceBook in SharePoint

I would like to share the link which is very simple and clear way of integrating the twitter and facebook in SharePoint.

Twitter Integration


Face Book Integration



Nov 24, 2011

Checking whether a file uploaded is of .doc or .docx file format

We can use the Java Script to check whether the file uploaded is of 2003 or 2007 word format. Hence we can handle the validation in the client side.
Java Script
<script type="text/javascript" language="javascript">
   function FileFormatValidate()
   {
        var uploadControl = document.getElementById('<%=FileUpload1.ClientID%>').value;
        //Regular Expression for the fileupload control.
        var reg = /^(([a-zA-Z]:)|(file://%7b2%7d/w )/$?)(//(/w[/w].*)) (.doc|.docx|.DOC|.DOCX)$/;
        //Checking if the file is empty or not
        if (uploadControl.length > 0) 
        {
            //Checks with the control value.
            if (reg.test(uploadControl)) 
            {
                return true;
            }
           else 
            {
                //If the condition not satisfied shows error message.
                alert("Only .doc, docx files are allowed!");
                return false;
            }
         }
        else 
        {
            //If the File is Empty or No File is  selected to upload shows this 
error message.
            alert("Please select a file to Upload");
            return false;
        }
    } //End of function FileFormatValidate.
</script>
Design
<p style="height: 28px; width: 216px">
    <asp:Button ID="btn_Upload" runat="server" Height="25px" 
        onclick="btn_Upload_Click" OnClientClick="return FileFormatValidate();" Text="Upload" Width="128px" />
</p>

Hence you can validate and check the file being uploaded at the client side using this code. This can be re-used for any file formats by changing the Regular Expression.
Happy Coding!!!


List of SharePoint 2010 Web Parts

Authoring
 Content Editor 
 Image Viewer
 Media Web Part
 Page Viewer 
 Silverlight Web Part
Business Data
 Business Data Actions
 Business Data Catalog Filter
 Business Data Item
 Business Data Item Builder
 Business Data List
 Business Data Related List
 Key Performance Indicators
 KPI Details
 Visio Graphics Service 
Content Rollup
 Chart Viewer
 Content Query
 HTML Form Web Part - Foundation
 Picture Library Slideshow Web Part
 RSS Viewer
 XML Viewer
 What’s Popular
Documents
 Document ID Lookup
 Document Set Contents
 Document Set Properties
 Relevant Documents
Filters
 Choice Filter
 Current User Filter
 Date Filter
 Filter Actions
 Page Field Filter
 Query String URL) Filter
 SharePoint List Filter
 SQL Server Analysis Services Filter
 Text Filter
My Information My Calendar
 My Contacts
 My Inbox
 My Mail Folder
 My Tasks
Navigation
 Categories
 Site Aggregator
 Sites in Category
 Summary Links
 Table of Contents
 Tag Cloud
Office Client Applications Excel Web Access
 InfoPath Form Web Part
 WSRP Viewer
People
 Contact Details
 Profile Browser
 Site Users - Foundation
 User Tasks - Foundation
PerformancePoint
 PerformancePoint Filter
 PerformancePoint Report
 PerformancePoint Scorecard
 PerformancePoint Stack Selector
Search Advanced Search Box
 Dual Chinese Search
 Featured Content
 Federated Results
 People Refinement Panel
 People Search Box
 People Search Core Results
 Refinement Panel
 Related Queries
 Search Action Links
 Search Best Bets
 Search Box
 Search Core Results
 Search Paging
 Search Statistics
 Search Summary
 Top Federated Results

Deafult.aspx is not opening in the SharePoint Designer

PROBLEM: Deafult.aspx is not opening in the SharePoint Designer


Error Details   

     Soap: Server was unable to process request. A Web Part or Web Form Control on this Web Part Page cannot be displayed or imported because it is not registered as safe on this site. You may not be able to open this page in an HTML editor that is compatible with Microsoft Windows SharePoint Services, such as Microsoft Office SharePoint Designer. To fix this page, contact the site administrator to have the Web Part or Web Form Control configured as safe. You can also remove the Web Part or Web Form Control from the page by using the Web Parts Maintenance Page. If you have the necessary permissions, you can use this page to disable Web Parts temporarily or remove personal settings. For more information, contact your site administrator.


Solution       

The problem is that the default.aspx page may contain some error web parts which can be removed by hitting the following url


This will open the web part maintenance page. So, here you can delete the error web part.