Monday, 3 October 2016

SharePoint 2016 Feature Comparison for Social Feature

In this Article, I will List a Feature comparison between SharePoint 2013 VS SharePoint 2016 Including the Standard and Enterprise Features. Please see below table for comparison across SharePoint version. Below table will compare the Social Features Only.


Social features
SharePoint Foundation 2013
SharePoint Server 2013 Standard CAL
SharePoint Server 2013 Enterprise CAL
SharePoint Server 2016 Standard CAL
SharePoint Server 2016 Enterprise CAL
Ask Me About
No
Yes
Yes
Yes
Yes
Blogs
Yes
Yes
Yes
Yes
Yes
Communities Reputation, Badging, and Moderation
No
Yes
Yes
Yes
Yes
Community
No
Yes
Yes
Yes
Yes
Company Feed
No
Yes
Yes
Yes
Yes
Document Conversations with Yammer
No
No
No
No
No
Follow
No
Yes
Yes
Yes
Yes
Microblogging
No
Yes
Yes
Yes
Yes
Newsfeed
No
Yes
Yes
Yes
Yes
One Click Sharing
No
Yes
Yes
Yes
Yes
People, Sites, Document Recommendations
No
Yes
Yes
Yes
Yes
Personal Site
No
Yes
Yes
Yes
Yes
Photos and Presence
Yes
Yes
Yes
Yes
Yes
Profile
No
Yes
Yes
Yes
Yes
Ratings
No
Yes
Yes
Yes
Yes
Shared with Me
No
No
No
No
No
Site Feed
No
Yes
Yes
Yes
Yes
OneDrive for Business
Yes6
Yes
Yes
Yes
Yes
Tag profiles
No
Yes
Yes
Yes
Yes
Tasks integrated with Outlook
No
Yes
Yes
Yes
Yes
Trending Tags
No
Yes
Yes
Yes
Yes
Wikis
Yes
Yes
Yes
Yes
Yes

Social

Office 365
 
Applies to: Office 365
Topic Last Modified: 2016-05-17
Microsoft SharePoint Online is a collection of Web-based tools and technologies that help your organization store, share, and manage digital information. Built on Microsoft SharePoint Server 2013, this hosted service is ideal for working on projects, storing data and documents in a central location, and sharing information with others. The following Social features let people work together in ways that are most effective for them. How? By providing great collaboration tools that anyone can use to share ideas, find people and expertise, and location business information.

Ask Me About

The Ask Me About section of your profile lets you list your areas of expertise, presenting yourself as a go-to person for those areas to anyone who visits your profile page. Learn more about SharePoint profiles.

Blogs

Blogs can enable an organization to quickly share information among employees, partners, or customers. People can add insight to a difficult subject area, provide inspiration and guidance, or explain a new guideline or procedure.

Communities Reputation, Badging, and Moderation

When you participate in community discussions, you build your reputation as an expert and earn points and badges that reward your contributions. If you’re really into it, you can become a moderator and work behind the scenes to makes sure the community thrives. Learn more about moderating a community.

Community

An online community is a virtual place where ideas are discussed and shared. It promotes open communication by fostering discussions among users who both share their expertise and learn from others. Learn more about creating a community.

Company Feed

The company feed is an organization’s public newsfeed. All posts appear to the company, including those created by people that users might not be following. Learn more about Company Feed.

Document Conversations with Yammer

If your organization uses Yammer as its default social network, you can start a conversation about a document, image, or video that is stored in a SharePoint Online document library or in OneDrive for Business. The Yammer conversation appears within the document in your browser, allowing for real-time collaboration with people in your organization. Anyone with access to the file can take part in the Yammer conversation. Learn how to edit documents from Yammer.

Follow

Users can follow people, documents, sites, and tags to see newsfeed postings associated with people, documents, sites, and tags that interest them. Learn more about following a SharePoint site.

Microblogging

Microblogging lets users post items of interest in a newsfeed and participate in conversations. To learn more about microblogging, see Post something to everyone.

Newsfeed

A newsfeed is a place to post information and reply to other posts, and to get updates about people and content you’re following. You can post to the public newsfeed or to newsfeeds on team sites on which you’re a member. To learn more about the SharePoint newsfeed, see Post something to everyone.

One Click Sharing

You can easily share documents and sites with others in your organization, from your OneDrive for Business and Sites pages, helping promote team collaboration. Learn more about sharing ideas, sites, and content.

People, Sites, Document Recommendations

Your OneDrive for Business and Sites pages give you suggestions for documents and sites to follow, based on your profile information and newsfeed activity. Learn more about suggested documents to follow.

Personal Site

Each SharePoint Online users has a personal site where data is personalized for them. Personal site includes a Newsfeed, OneDrive document library, and Sites pages. To learn more about sharing ideas, sites, and content.

Photos and Presence

Exchange Online and Skype for Business Online integration with some Office 365 plans allows users to sync their profile pictures and presence indicator with SharePoint Online. Photos appearing in a person’s About Me page are managed by Exchange Online and are no longer managed by using the SharePoint admin center.

Profile

Part of a user’s profile is fed in from the Office 365 directory service. If an organization sets up Office 365 Directory Synchronization (DirSync), then user profiles will sync with that organization’s Active Directory accounts. Learn more about SharePoint profiles.

Ratings

Users can add ratings to their OneDrive for Business libraries that allow sites visitors to ‘Like’ a library document or to use a ‘star’ tool to rate it. Learn more about adding a ratings feature to a library.

Shared with Me

Find documents that others have shared with you. Shared with Me eliminates the worry of finding those important items, because now they're all visible in a single view from within your OneDrive for Business. For more information, see View documents and folders shared with you.

Site Feed

A site feed, similar to a newsfeed, is a place on a team site to post information, and reply to other posts. Learn more about posting something to a small group of people.

OneDrive for Business

OneDrive for Business is a service available with SharePoint Online that lets users sync documents to the cloud, and also to their computers. Learn more about OneDrive for Business.

Tag profiles

Tag profiles display information about tags that appear in a newsfeed. Information includes conversations that reference the tag and a list of related tags. Learn more about tags.

Tasks integrated with Outlook

You can synchronize your SharePoint task lists with Exchange so that you can manage and add tasks by using Outlook.

Trending Tags

Currently popular #tags references appear in public newsfeed posts.

Wikis

A wiki is a site designed for groups of people to quickly capture and share ideas by creating simple pages and linking them together. Every team site is a wiki, but you can also add a separate wiki page library to a site, or create a large-scale Enterprise wiki as a separate site or site collection. Learn more about creating a wiki.

Feature Availability

To view feature availability across Office 365 plans, standalone options, and on-premise solutions, see SharePoint Online Service Description

Wednesday, 28 September 2016

10 Things you can do to make SharePoint Secure



  1. No Anonymous access
  2. Use SSL
  3. Use Claim based or Form Based authentication
  4. Use Unqiue permissions
  5. Use groups to manage the permissions
  6. make sure all authenticated user group not added any where
  7. enable the auditing on the Site
  8. make sure your sharePoint farm is upto date for security vulnerabilities(MSFT release every month).
  9. reduce the number of site collections admins.

10. the best way to test for everything is to do unit testing, and test every possible combination of possible vulnerabilities you can think of. You can either script this, or do it manually.

Picture library slideshow using Client object model

Sharepoint Picture library slideshow using Client object model:

Note :

     Please add your CSS class and I unable to use  HTML tag. that why i have removed "<" simple

HTML Code : 
 div class="container">
            div class="row">
                div class="col-md-8 col-sm-8">
                    div id="carousel-main" class="carousel slide" data-ride="carousel">
                       
                        div class="carousel-wrapper">
div id="carousel-main" class="carousel slide" data-ride="carousel">
       
        ol class="carousel-indicators" id="carousel-indicators">
        /ol>
div id="SlideShowImg" class="carousel-image">
       
        div id="SlideShowText" class="carousel-inner" role="listbox">
       
        /div>      
        /div>
      /div>
                       
                        Previous Next
               
                /div>
                div class="col-md-4 col-sm-4">
                    div >
                        div class="widgets">
                            div class="widget-row"> span class="widget-title">My Team Sites
                           

                            div class="widget-row"> span class="widget-title">Safety First
                       
                        div class="safety"> img src="https://nabholz.sharepoint.com/SiteAssets/images/SafetyTracker.png">
                 
                   
               
           
       
       

Javascript Code : 

SharePoint:scriptlink runat="server" Name="SP.js" Localizable="false" OnDemand="False" LoadAfterUI="True">
script type="text/javascript">
ExecuteOrDelayUntilScriptLoaded(ViewImgSlideShow, "sp.js");

var text = "";
var indicator = "";
var Active = 0;


function ViewImgSlideShow() {

  var siteUrl = _spPageContextInfo.siteServerRelativeUrl;


  var context = new SP.ClientContext(siteUrl);
  var web = context.get_web();
  var list = context.get_web().get_lists().getByTitle('Banners');

  //It will fetch all the items from the list
  var myquery = new SP.CamlQuery();

// If you need any filter option use Caml Query otherwise Remove this code :

  myquery.set_viewXml('View>Query>Where>Geq>FieldRef Name=\'ID\'/>' +
    'Value Type=\'Number\'>1
RowLimit>100');
  myItems = list.getItems(myquery);
  context.load(myItems);

  //If the items load correctly then success function will be called
  context.executeQueryAsync(Function.createDelegate(this, this.success_ViewImgSlideShow), Function.createDelegate(this, this.failed_ViewImgSlideShow));

}

function success_ViewImgSlideShow() {
  var ListEnumerator = this.myItems.getEnumerator();
  var aTxt;
  Active = 0;
  while (ListEnumerator.moveNext()) {
    var currentItem = ListEnumerator.get_current();
    if (Active == 0) {
      aTxt = "active";
    } else {
      aTxt = "";
    }
    text += "div class='item " + aTxt + "'>span id='imageItem_" + Active + "'>
img class='no' src='" + currentItem.get_item('FileRef') + "' />  ";
    Active += 1;
  }
}


function failed_ViewImgSlideShow(sender, args) {
  alert("failed. Message:" + args.get_message());
}
/script>

OutPut:

Tuesday, 20 September 2016

What is the 'CLSCompliant' attribute in .NET?

You mark classes with the CLSCompliant attribute when you want to make sure it can be used by any other .NET language. These are the basic rules:
  1. Unsigned types should not be part of the public interface of the class. What this means is public fields should not have unsigned types like uint or ulong, public methods should not return unsigned types, parameters passed to public function should not have unsigned types. However unsigned types can be part of private members.
  2. Unsafe types like pointers should not be used with public members. However they can be used with private members.
  3. Class names and member names should not differ only based on their case. For example we cannot have two methods named MyMethod and MYMETHOD.
  4. Only properties and methods may be overloaded, Operators should not be overloaded.

Syntax : [assembly: System.CLSCompliant(false)]

Wednesday, 14 September 2016

sharepoint Pop-Up Dialogs no need to display master page design

SharePoint 2013 allows us to hide site elements in dialogs just as we could in SharePoint 2010. Just be aware that the class we add to such elements we wish to hide has changed.
The Problem:

In a custom branding project you add a new container element, such as a new header, navigation block or footer to your System (default) Master Page. This element then appears in dialogs even through we do not want it to.
Solution:
In SharePoint 2010 we would add the following class to an HTML block we want hidden in dialogs.
1
s4-notdlg
such as
1
2
3
<div id="custom-header" class="s4-notdlg">
<!—the rest of the header-->
</div>
In SharePoint 2013 we use the same method, just a different class, ms-dialogHidden.
1
2
3
<div id="custom-header" class="ms-dialogHidden">
<!—the rest of the header-->
</div>
You can add the ms-dialogHidden class to any HTML element in your Master Pages, Page Layouts, or even content referenced by Master Pages in Webparts let’s say that you want hidden in a dialog.

Tuesday, 2 February 2016

Move Your file to Catalogs folder

Console for migration to sp2013 (move master page)


using Microsoft.SharePoint;
using System;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Movemp
{
    class Program
    {
        static void Main(string[] args)
        {
            String fileToUpload = @"C:\YourFile.txt";
            String sharePointSite = "http://*******:7778/_catalogs/masterpage";  // Change your site url
         
            SPSecurity.RunWithElevatedPrivileges(delegate()
                {
            using (SPSite oSite = new SPSite(sharePointSite))
            {
                using (SPWeb oWeb = oSite.OpenWeb())
                {
                    if (!System.IO.File.Exists(fileToUpload))
                        throw new FileNotFoundException("File not found.", fileToUpload);

                    SPFolder mPageFolder = oWeb.Folders["_catalogs"].SubFolders["masterpage"];
                    using (FileStream mPageStream = new FileStream(fileToUpload, FileMode.Open))
                    {
                        SPFileCollection mPageFileCollection = mPageFolder.Files;
                        SPFile mPageFile = mPageFileCollection.Add(
                            "YourFile.txt",  
                            mPageStream,true
                        );   // Change your file name
                    }
                }
               
            }
                });
        }
    }
}

Tuesday, 26 January 2016

Export girdview to Excel using JavaScript object model in SharePoint 2010

In this post we will discuss how to export gridview  to excel in SharePoint 2010 using JavaScript client object model.

function fnExcelReport()
         {
 
 
             var strTableID = "{0120ED5F-14B2-45FB-A817-2C5F8B6AAF23}-{G_851CE056_F02A_4524_AD2D_CC9185FF96F3}";  // It's the Table ID of Table in Webpart
var detailsTable = document.getElementById(strTableID);
var columns = detailsTable.getElementsByTagName("th");
var oExcel = new ActiveXObject("Excel.Application");
var oBook = oExcel.Workbooks.Add;
var oSheet = oBook.Worksheets(1);
for(i=0;i                                oSheet.cells(1,i+1).value= columns[i].innerText; //XlSheetHeader[i];
                                oSheet.cells(1,i+1).font.color="6";
                                oSheet.cells(1,i+1).font.bold="true";
                      oSheet.cells(1,i+1).interior.colorindex="15";
                      oSheet.cells(1,i+1).columnwidth =20;
                        }
for (var y=0;y// detailsTable is the table where the content to be exported is
{
    for (var x=0;x    {
        oSheet.Cells(y+1,x+1) = detailsTable.rows(y).cells(x).innerText;
    }
}

oSheet.columns.autofit;
oExcel.Visible = true;
oExcel.UserControl = true;              
         }

Sunday, 16 August 2015

How do I convert a text file to an Excel file with validation using C#?


Text file Format

C# Code:

using System;
using System.Collections;
using System.Collections.Generic;
using System.IO;
using System.Linq;
using System.Text;
using Excel = Microsoft.Office.Interop.Excel;

namespace text_excel
{
    class Program
    {
        static void Main(string[] args)
        {

            Excel.Application xlApp;
            Excel.Workbook xlWorkBook;
            Excel.Worksheet xlWorkSheet;
            object misValue = System.Reflection.Missing.Value;
            Excel.Range chartRange;

            xlApp = new Excel.Application();
            xlWorkBook = xlApp.Workbooks.Add(misValue);
            xlWorkSheet = (Excel.Worksheet)xlWorkBook.Worksheets.get_Item(1);

            string line;
            using (StreamReader reader = new StreamReader(@"yourFilePath.txt"))
            {
                int lineNo = 4;
                ArrayList list = new ArrayList();
                int[] arr4 = new int[100];
                while ((line = reader.ReadLine()) != null)
                {
                    
                    int colomnNo = 2;
                    string[] words = line.Split('|');
                    int startno = 0;
                    if (line.StartsWith("Sriram validation"))
                    {
                        string output = line.Replace("Sriram validation | ", "");
                        string[] numbers = output.Split('|');
                       
                        foreach (string nos in numbers)
                        {   
                            arr4[startno] = Convert.ToInt16(nos);
                            startno++;
                        }
                    }
                    else
                        foreach (string word in words)
                        {
                            string wordcount = word.Trim();
                            xlWorkSheet.Cells[lineNo, colomnNo] = wordcount;
                            if (arr4[startno] == wordcount.Length)
                                 xlWorkSheet.Cells[lineNo, colomnNo].Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Green);
                            else if (arr4[startno] < wordcount.Length)
                                xlWorkSheet.Cells[lineNo, colomnNo].Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);
                            else if (arr4[startno] > wordcount.Length)
                                xlWorkSheet.Cells[lineNo, colomnNo].Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Blue);
                            colomnNo++;
                            startno++;
                        }
                    lineNo++;
                }
            }
            xlWorkSheet.get_Range("b2", "e3").Merge(false);

            chartRange = xlWorkSheet.get_Range("b2", "e3");
            chartRange.FormulaR1C1 = " Validation";
            chartRange.HorizontalAlignment = 3;
            chartRange.VerticalAlignment = 3;
            chartRange.Interior.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Yellow);
            chartRange.Font.Color = System.Drawing.ColorTranslator.ToOle(System.Drawing.Color.Red);
            chartRange.Font.Size = 20;

            xlWorkBook.SaveAs("d:\\csharp.net-informations.xls", Excel.XlFileFormat.xlWorkbookNormal, misValue, misValue, misValue, misValue, Excel.XlSaveAsAccessMode.xlExclusive, misValue, misValue, misValue, misValue, misValue);
            xlWorkBook.Close(true, misValue, misValue);
            xlApp.Quit();

            releaseObject(xlApp);
            releaseObject(xlWorkBook);
            releaseObject(xlWorkSheet);
        }

        private static void releaseObject(object obj)
        {
            try
            {
                System.Runtime.InteropServices.Marshal.ReleaseComObject(obj);
                obj = null;
            }
            catch (Exception ex)
            {
                obj = null;
                //MessageBox.Show("Unable to release the Object " + ex.ToString());
            }
            finally
            {
                GC.Collect();
            }
        } 
    }
}

Output :


Saturday, 15 August 2015

text to speech in c#



First, we need to reference the System.Speech assembly from the application. From the Project menu, choose Add Reference. The from the .NET tab, highlight System.Speech and choose OK.

Declarations

Next, we need to declare and instantiate a speech object. The class isSystem.Speech.Synthesis.Speechsynthesizer. This one class has enough properties and methods to speak a string using the default language and voice of the OS. In Microsoft Windows Vista, the default voice is Microsoft Ana. 


protected void ibtnSpeaker_Click(object sender, ImageClickEventArgs e)
        {
            Thread t = new Thread(() =>
            {
                SpeechSynthesizer audio = new SpeechSynthesizer();
                audio.SelectVoiceByHints(VoiceGender.Female, VoiceAge.Senior); // to change VoiceGender and VoiceAge check out those links below
                audio.Volume = 100;  // (0 - 100)
                audio.Rate = -1;     // (-10 - 10)
                audio.Speak(lblQuestionStart.Text);
            });
            t.Start();
        }

Thursday, 30 July 2015

How to remove unused using namespaces

 Visual Studio can do this for you.
Organise Usings > Remove Unused Usings
I am using this all the time, to clean up code, and make code compilation quicker.
Or you can use PowerCommands to remove unused usings for entire projects

Install this Microsoft-created add-in, and VS 2010 will always remove and sort usings every time you save a code file (e.g. with Ctrl-S or clicking a Save button).
The option is under Tools > Options > PowerCommands > Remove and Sort Usings on save. There's also an option to automatically format the document on Save, which will make sure your code lines up, doesn't include trailing spaces, etc.
(Should you need to avoid removing and sorting usings while this is installed, just build or run your code without explicitly saving. The automatic save-on-build or save-on-run will still happen.)

Monday, 25 May 2015

Understanding LINQ in One-Liners

Here I will provide one liner-explanations of terminology used with LINQ.
  • From: initialize a data source just like we declare a variable first before using it in C#.
  • where: applies a condition in a LINQ query.
  • select: selects a value from the LINQ query.
  • var: assigns a variable for when we don't know the return type of our LINQ query.
  • Deffered execution: the LINQ query will store only the information, it will not provide the result directly to you. To get the result you need to use a foreach loop or toList or ToArray method. Until this stage LINQ is in the deffered execution stage.
  • foreach loop: to iterate the result that we got from the LINQ query and then to execute the result.
  • IEnumerable: use this if you know that your LINQ query return type will be a string and the data is in your in-memory.
  • IQueryable: use this if the query is generated using a database.
  • Lambda expression: use the => operator if you are using a method-based LINQ query. The left hand of the => operator is the input and the right hand side is the output.
  • Expression lambda: use an expression lambda if you want to pass an expression on the left hand side of the => operator.
  • Statement lambda: If you want to use a statement in the right hand side of the => operator then use the statement lambda enclosed in brackets {}.
  • Async Lambda: use this if you want to use async or await in your LINQ query.
  • Async and await: to do asynchronous programming like if one resource is busy then the other program will keep executing, it will not wait for completion of the resource task.
  • let: use the let keyword when you want to store the result of any expression inside the LINQ.
  • LINQ to SQL: use this if you want to access a collection from a SQL Server in your in-memory.
  • System.Data.Linq.dll: add this DLL if you want LINQ to SQL.
  • insertonsubmit: use this when you want to insert data into SQL using LINQ to SQL.
  • deleteonsubmit: use this when you want to delete data in SQL using LINQ to SQL.
  • submitchanges: use this in LINQ to SQL after insertonsubmit or deleteonsubmit or if you have updated any data in your in-memory collection. This will submit your data finally to the database.
  • LINQ to dataset: use this if you want to query your in-memory dataset.
  • System.Data.DataSetExtensions: use this DLL if you want to use LINQ to a dataset.
  • asenumerable: use this if you want to apply LINQ to a datatable since a datatable doesn't implement ienumerable or iqueryable.
  • field: use the field method in LINQ to access a datatable column using LINQ to dataset.
  • setfield: use SetField if you want to set column values in a DataRow using LINQ to dataset.
  • isnull: use isnull if you want to check that a column is null or not using LINQ to dataset.
  • join: use this if you want to join two datatables using LINQ to dataset.
  • groupjoin: use this when you want a superset of inner joins and left outer joins.
  • LINQ to Objects: use this if you want to apply the LINQ on an array, list or dictionary.
  • LINQ to XML: use this if you want to do manipulation with XML or if you want to create new XML using LINQ.
  • Distinct: use this with your LINQ query if you want to remove duplicate values from a collection.
  • Except: use this with LINQ if you want to return the set difference of two collections.
  • Intersect: use this if you want to return common data from two collections in LINQ.
  • Union: use this when you want all elements from both collections but the result should not contain duplicate data.
  • All: use this in LINQ if you want to check that your condition is satisfying all the elements of a collection.
  • Any: use this in LINQ if you want to check your condition with any element in a collection.
  • Contains: use this if you want to check whether or not a sequence contains a specified element.
  • Skip: use this if you want to skip elements up to a specified position in a sequence.
  • SkipWhile: use this if you want to skip elements until the condition is true.
  • Take: use this if you want to take the first n elements from a sequence.
  • Takewhile: use this if want to take all the elements when the condition becomes true.
  • concat: use this if you want to combine two sequences, it may contain duplicate values also.
  • AsQueryable: use this if you want to convert a generic Ienumerable type to a generic IQueryable Type.
  • Cast: use this if you want to cast an element of a sequence in any other type.
  • ToArray: use this if you want to convert your collection into an array and if you want to force query execution.
  • ToDictionary: use this function if you want to put your element into a dictionary based on key. This will also force query execution.
  • ToList: use this if you want to convert collections into a generic list. This will also force query execution.
  • ToLookup: this is also like a dictionary but with a one-to-many relationship. Use this if you want to put your element into a dictionary.
Refer: http://www.c-sharpcorner.com/UploadFile/3dc6f6/linq-understanding-in-one-liner/

Sunday, 19 April 2015

Sharepoint Central administration gives a blank page after installing Sharepoint 2007 on Windows 7 64bit


The problem is getting a blank page instead of Central Administration after the configuration of Sharepoint on the machine
Cause of the problem:
The following authentication mechanisms are not installed or disabled on the IIS
  1. Digest Authentication
  2.  Basic Authentication
  3. Windows Authentication
To install them open command prompt and run the following command
Command 
start /w pkgmgr /iu:IIS-WebServerRole;IIS-WebServer;IIS-CommonHttpFeatures;IIS-StaticContent;IIS-DefaultDocument;IIS-DirectoryBrowsing;IIS-HttpErrors;IIS-ApplicationDevelopment;IIS-ASPNET;IIS-NetFxExtensibility;IIS-ISAPIExtensions;IIS-ISAPIFilter;IIS-HealthAndDiagnostics;IIS-HttpLogging;IIS-LoggingLibraries;IIS-RequestMonitor;IIS-HttpTracing;IIS-CustomLogging;IIS-ManagementScriptingTools;IIS-Security;IIS-BasicAuthentication;IIS-WindowsAuthentication;IIS-DigestAuthentication;IIS-RequestFiltering;IIS-Performance;IIS-HttpCompressionStatic;IIS-HttpCompressionDynamic;IIS-WebServerManagementTools;IIS-ManagementConsole;IIS-IIS6ManagementCompatibility;IIS-Metabase;IIS-WMICompatibility;WAS-WindowsActivationService;WAS-ProcessModel;WAS-NetFxEnvironment;WAS-ConfigurationAPI;WCF-HTTP-Activation;WCF-NonHTTP-Activation

The command will be executed and you can see in IIS that these authentication mechanisms will be added. See the sample screenshot below:



Please make sure that the Windows Authentication should be enabled to access the SharePoint 2010 central administration page.

So, now you can browse the central admin page instead of blank page.

Disabled New Application Button in Central Administrator Sharepoint 2010



  1. Go to control Panel (win + r  shortcut key for run textbox and type control)
  2. Click on System and Security
  3. Under “Action Center” section , click on “Change User Account Control settings”
  4.  Scroll down the scrollbar to “Never Notify” as shown in below figure
  5.  Click on Ok
  6.  Restart the system ( This step is necessary)
  7. Now open the central administration as administrator
  8. Now the New Web Application button is enabled
NewWebDisabled


Friday, 13 March 2015

How to print a number with commas as thousands separators in JavaScript

I would like to format a currency with $ in JavaScript.


        function numberWithCommas(currency) {
           
            var decimalplaces = 2;
            var decimalcharacter = ".";
            var thousandseparater = ",";
            currency = parseFloat(currency);
            var sign = currency < 0 ? "-" : "";
            var formatted = new String(currency.toFixed(decimalplaces));
            if (decimalcharacter.length && decimalcharacter != ".") { formatted = formatted.replace(/\./, decimalcharacter); }
            var integer = "";
            var fraction = "";
            var strnumber = new String(formatted);
            var dotpos = decimalcharacter.length ? strnumber.indexOf(decimalcharacter) : -1;
            if (dotpos > -1) {
                if (dotpos) { integer = strnumber.substr(0, dotpos); }
                fraction = strnumber.substr(dotpos + 1);
            }
            else { integer = strnumber; }
            if (integer) { integer = String(Math.abs(integer)); }
            while (fraction.length < decimalplaces) { fraction += "0"; }
            temparray = new Array();
            while (integer.length > 3) {
                temparray.unshift(integer.substr(-3));
                integer = integer.substr(0, integer.length - 3);
            }
            temparray.unshift(integer);
            integer = temparray.join(thousandseparater);

            // Here we are showing alert message
            alert(sign + integer + decimalcharacter + fraction);
        }


TextBox ID="txtnumber" runat="server" onblur="numberWithCommas(this.value);"

Sunday, 1 February 2015

Top in SQL SERVER 2008


The TOP keyword allows you to return the first n number of rows from a query based on the number of rows or percentage of rows that you define.
The first rows returned are also impacted by how your query is ordered.
In previous versions of SQL Server, developers used SET ROWCOUNT to limit rows returned or impacted.

We can use the top keyword with the following queries:
Select
Insert
Delete
Update
Basically, most of us know about top, we can use it in a select query to get the top element from the query.

But top can also be used in Insert, Delete and Update commands for the table as well.

We will see how we can use top with Insert, Delete and Update.

1 Top with select statement

Syntax: - SELECT TOP 10 * FROM
Example:- 
SELECT top(1) Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]


2 Top with Insert Statement

It is when we have to insert only the top few records that we can use this:

Syntax:-
 

Insert top (10) into (column1, column2.....)
Select column1, column2..... From
 
or
 
Insert into (column1, column2.....)
Select TOP (10) column1, column2..... From
 

Example:-
 
INSERT TOP (2) INTO [dbo].[SampleTable1]
SELECT Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]

ORDER BY Class DESC

SELECT Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]


SELECT Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable1]




 Top with Delete Statement

Deleting top records from a table:

Syntax: -
 Delete top (10) from where

Example:-
 

SELECT  Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]
DELETE Top(1) FROM [SampleDB].[dbo].[SampleTable]
SELECT  Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]

Top with Update statement

Updating top records from a table:

Syntax: -
 Update top (10) set Colmn1= 

Example: -
 
SELECT  Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]
UPDATE TOP (1) [dbo].[SampleTable] SET Class='Hindi' WHERE Class='Msc'
SELECT  Name,Class,Age,Address,Phone,Pin FROM [dbo].[SampleTable]





.