SharePoint Online Training

SharePoint Online Training
                     SharePoint 2013 Development 

 SharePoint 2013 Concept 
  •  What is SharePoint 
  •  SharePoint Different Versions 
  •  SharePoint topology 
  •  SharePoint installation and configuration 
  •  Active Directory 
  •  IIS 
  •  Central administration 
  •  Service Applications 
  •  Authentication 
  •  SharePoint Online Intro 
  •  PowerShell 

SharePoint 
  •  Web Application 
  •  Site Collection 
  •  Site Templates 
  •  Managing Access / Site Administration 
  •  List 
  •  Library 
  •  View 

Light Branding, Navigation, Pages 
  •  Master Pages 
  •  Layouts 
  •  Application Pages 
  •  Designer and overview 

 SharePoint Development Practices and Techniques 
  •  Visual Studio Basics 
  •  .net basic 
  •  C# Basic 
  •  ASP.Net Basics 
  •  VS Tools 
  •  WebParts Creation and Deploy 
  •  Features 
  •  Solutions 
  •  Event Receivers 

 Search 
  •  Create Search Service Applications 
  •  Architecture 
  •  Configure 
  •  Manage 
  •  Content Sources and Scopes 
 Managed Meta data 
  •  Enable Managed Metadata Navigation 
  •  Metadata Navigation for a List or Library 

 User Profile Service 
  •  Introduction 
  •  Creation 
  •  Configuration 
  •  Manage 
  •  Mysite page creations and Working 
  •  SkyDrive 

 Workflows 
  •  Introduction 
  •  Types of Workflows 
  •  OOTB 
  •  Designer Workflows 
  •  Visual Studio Workflows 

Business Connectivity Services 
  •  Introduction of BCS 
  •  Create Business Connectivity Services Application 
  •  Configuration Business Connectivity Services Application 
  •  External Content type from BCS 
  •  How BCS Services work? 

 Enterprise Content Management 
  •  Document Sets 
  •  Records Management 

SharePoint Apps 
  •  Introduction to Apps 
  •  Configuration of Apps 
  •  Types of Apps 
  •  How to publish apps in AppStore 
  •  Create Apps 

 Office WebApp Server 

 Windows Azure and Office 365 

 SharePoint Designer 
  •  Introduction 
  •  Overview 
  •  Creation 
  •  Fixing issues 

 InfoPath 
  •  Introduction 
  •  Creation 
  •  Publishing 
  •  Issues 

 Migration 
  •  Backup and Restore 
  •  Migration intro 
  •  Tools and work 

Others 
  •  Common issues 
  •  Browser Debug tools 



How to Export particular Group in Term Store Management in SharePoint 2013

How to Export particular Group in Term Store Management in SharePoint 2013
  The following PowerShell script can be used to Export  particular Group in Term Store Management in SharePoint 2013. Here we have to give 'Site Collection','Name of the group' and 'Path' where we have to save the group.

param(
    [string]$siteUrl = "site collection",
    [string]$termGroup = "Name_Of_Term_Store",
    [string]$exportPath = "C:\export1"
)


function Add-Snapin {
    if ((Get-PSSnapin -Name Microsoft.Sharepoint.Powershell -ErrorAction SilentlyContinue) -eq $null) {
        $global:SPSnapinAdded = $true
        Write-Host "Adding SharePoint module to PowerShell" -NoNewline
        Add-PSSnapin Microsoft.Sharepoint.Powershell -ErrorAction Stop
        Write-Host " - Done."
    }
    
    Write-Host "Adding Microsoft.SharePoint assembly" -NoNewline
    Add-Type -AssemblyName "Microsoft.SharePoint, Version=14.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
    # Disable the above line and enable the line below for SharePoint 2013
    # Add-Type -AssemblyName "Microsoft.SharePoint, Version=15.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c"
    Write-Host " - Done."
}

function Remove-Snapin {
    if ($global:SPSnapinAdded -eq $true) {
        Write-Host "Removing SharePoint module from PowerShell" -NoNewline
        Remove-PSSnapin Microsoft.Sharepoint.Powershell -ErrorAction SilentlyContinue
        Write-Host " - Done."
    }
}

function Get-ScriptDirectory
{
    $Invocation = (Get-Variable MyInvocation -Scope 1).Value
    return Split-Path $Invocation.MyCommand.Path
}

function Export-SPTerms {
    param (
        [string]$siteUrl = $(Read-Host -prompt "Please provide the site collection URL"),
        [string]$termGroupName = $(Read-Host -prompt "Please provide the term group name to export"),
        [string]$saveLocation = $(Read-Host -prompt "Please provide the path of the folder to save the CSV file to")
    )
    
    if ([IO.Directory]::Exists($saveLocation) -eq $false)
    {
        New-Item ($saveLocation) -Type Directory | Out-Null
    }
    
    Write-Host "Getting Taxonomy Session";
    $taxonomySession = Get-SPTaxonomySession -site $siteUrl
    $taxonomyTermStore =  $taxonomySession.TermStores | Select Name
    $termStore = $taxonomySession.TermStores[$taxonomyTermStore.Name]
    $fileRootNoteCreated = $false;
    
    # Ampersands are stored as full width ampersands (see http://www.fileformat.info/info/unicode/char/ff06/index.htm)
    [Byte[]] $amp = 0xEF,0xBC,0x86
    
    Write-Host "Looping through Term store Groups to find: '$termGroupName'"
    foreach ($group in $termStore.Groups) {
        Write-Host "Checking: '$($group.Name)'"
        $groupName = $group.Name.Replace([System.Text.Encoding]::UTF8.GetString($amp), "&");
        if ($groupName -eq $termGroupName) {
        
            Write-Host "Looping through Term sets"
            foreach ($termSet in $group.TermSets) {
                # Remove unsafe file system characters from file name
                $parsedFilename =  [regex]::replace($termSet.Name, "[^a-zA-Z0-9\\-]", "_")
                
                $file = New-Object System.IO.StreamWriter($saveLocation + "\termset_" + $parsedFilename + ".csv")
                
                # Write out the headers
                #$file.Writeline("Term Set Name,Term Set Description,LCID,Available for Tagging,Term Description,Level 1 Term, Level 2 Term,Level 3 Term,Level 4 Term,Level 5 Term,Level 6 Term,Level 7 Term")
                $file.Writeline("<termStore Name='" + $termStore.Name + "' GUID='" + $termStore.ID + "' Group='" + $groupName + "'>");   
                $file.Writeline("`t<termSet Name='" + $termSet.Name + "' GUID='" + $termSet.ID + "' Description='" + $termSet.Description + "'>");
                try {
                    Export-SPTermSet $termSet.Terms
                }
                finally {
                    $file.Writeline("`t</termSet>");
                    $file.Writeline("</termStore>");
                    $file.Flush()
                    $file.Close()
                }
            }
        }
    }
}

function Export-SPTermSet {
    param (
        [Microsoft.SharePoint.Taxonomy.TermCollection]$terms,
        [int]$level = 1,
        [string]$previousTerms = ""
    )
    
    $tabCount = $level+1;
    if ($level -gt 1) {$tabCount = $tabCount + ($level-1);}
    
    if ($terms.Count -gt 0)
    {
        $file.Writeline("`t" * $tabCount + "<terms>");
    }
    
    if ($level -ge 1 -or $level -le 7)
    {
        if ($terms.Count -gt 0 ) {
            $termSetName = ""
            if ($level -eq 1) {
                $termSetName =  """" + $terms[0].TermSet.Name.Replace([System.Text.Encoding]::UTF8.GetString($amp), "&") + """"
            }
            $terms | ForEach-Object {
                $termName = $_.Name.Replace([System.Text.Encoding]::UTF8.GetString($amp), "&");
                $currentTerms = $previousTerms + ",""" + $termName + """";
                
                $file.Writeline("`t" * $tabCount + "`t<term Name='" + $termName + "' isAvailableForTagging='" + $_.IsAvailableForTagging + "'>");
                $file.Writeline("`t" * $tabCount + "`t`t<description>" + $_.GetDescription() + "</description>");
                
                if ($level -lt 7) {
                    Export-SPTermSet $_.Terms ($level + 1) ($previousTerms + $currentTerms)
                }
                $file.Writeline("`t" * $tabCount + "`t</term>");
            }
        }
    }

    if ($terms.Count -gt 0)
    {
        $file.Writeline("`t" * $tabCount + "</terms>");
    }
}

try {
    Write-Host "Starting export of Metadata Termsets" -ForegroundColor Green
    $ErrorActionPreference = "Stop"
    Add-Snapin
    
    if (!($exportPath)) {
        $exportPath = (Get-ScriptDirectory)
    }
    
    Write-Host "Site: $siteUrl" -ForegroundColor Yellow
    Write-Host "Term Group: $termGroup" -ForegroundColor Yellow
    Write-Host "Export Path: $exportPath" -ForegroundColor Yellow
    
    Export-SPTerms $siteUrl $termGroup $exportPath
}
catch {
    Write-Host ""
    Write-Host "Error : " $Error[0] -ForegroundColor Red
    throw
}
finally {
    Remove-Snapin
}
Write-Host Finished -ForegroundColor Blue

Asp.net Real time Interview questions

Asp.net Real time Interview questions
Hi Today one of my friend attened interview on .net,he was having 2+ years of exprience.
These all the he faced in the Interview.I hope those who trying for job i will help full.


Tell me about Yourself?
Tell About Your Project?
Why we are using RDLC Reports?
Life Cycle of .net?
CLR?
CTS?
Method overloading and Method Overriding?
Why they are updating HTML4 to HTML5?
How to select the second highest salaried employee from table?
Ways to debug JavaScript?
Ado.net architecture?
Tell about .net framework 4.0 and 4.5 ?
We are having so many technologies like Java,PHP then why we have to go for .net?
What is Sealed Class?
How to pass text box values using java script and jquery?
Program based on oops concepts?
Ways to connect database with .net?
What is the Use of Abstract class?
When you will use Abstract class and Interface?

What is the Difference between Abstract class and Interface?
What is the Difference between Session and Application?

How to import group to Term Store Management using PowerShell Script in SharePoint 2103

   
      The following PowerShell script can be used to import group to term store management. Here we have to give Service name , site Url , Path and Name of term Store.

##Variables to be edited##############
$MMSService="servicename"
$CentralAdmin="http://localhost"


$CSVFILEPATH= "C:\Group.csv"

##Variables that should not be edited
$groupname="Name_Of_Term_Store"

cls
Write-Host "Loading IIS module"
Write-Host "Loading SharePoint Commandlets"
Add-PSSnapin Microsoft.SharePoint.PowerShell -erroraction SilentlyContinue
Write-Host -ForegroundColor Green " Commandlets Loaded ... Loading Variables"
Write-Host
function ImportTermSet([Microsoft.SharePoint.Taxonomy.TermStore]$store, [string]$groupName, [PSCustomObject]$termSet) {
  function ImportTerm([Microsoft.SharePoint.Taxonomy.Group]$group,
                      [Microsoft.SharePoint.Taxonomy.TermSet]$set,
                      [Microsoft.SharePoint.Taxonomy.Term]$parent,
                      [string[]]$path) {      
    if ($path.Length -eq 0) {
      return
    } elseif ($group -eq $null) {
      $group = $store.Groups | where { $_.Name -eq $path[0] }
      if ($group -eq $null) {
        $group = $store.CreateGroup($path[0])
      }
    } elseif ($set -eq $null) {
      $set = $group.TermSets | where { $_.Name -eq $path[0] }
      if ($set -eq $null) {
        $set = $group.CreateTermSet($path[0])
      }
    } else {
      $node = if ($parent -eq $null) { $set } else { $parent }
      $parent = $node.Terms | where { $_.Name -eq $path[0] }     
      if ($parent -eq $null) {
        $parent = $node.CreateTerm($path[0], 1033)
      }
    }
  
    ImportTerm $group $set $parent $path[1..($path.Length)]
        Commit $store 2>&1 | out-null
    #$store.CommitAll()
  }
 
  function RemoveTermGroup([Microsoft.SharePoint.Taxonomy.TermStore]$store, [string]$groupName) {
    $group = $store.Groups | where { $_.Name -eq $groupName }
    if ($group -ne $null) {
      $group.TermSets | foreach { $_.Delete() }
      $group.Delete()
      $store.CommitAll()
    }
  }
 
  function Commit($store) {
    $store.CommitAll()
  } 
  RemoveTermGroup $store $groupName
  $termSetName = $termSet[0]."Term Set Name"  
  $termSet | where { $_."Level 1 Term" -ne "" } | foreach {
    $path = @($groupName, $termSetName) + @(for ($i = 1; $i -le 7; $i++) {
      $term = $_."Level $i Term"
        if ($term -eq "") {
          break
        } else {
          $term
        }
      }
    )      
    ImportTerm -path $path
    $ErrorActionPreference = "Continue";
  }
  }
$CAsite =$CentralAdmin
Sleep 2
"Connecting to Term Store"
Write-host
$session = new-object Microsoft.SharePoint.Taxonomy.TaxonomySession($CAsite)
$store = $session.TermStores[$MMSService] 
"Importing Term Set CSV File"
Write-Host
$termSet = Import-Csv $CSVFILEPATH
ImportTermSet $store $groupname $termSet
"All Term Sets have been imported"
Write-Host

The following image to show "service name"





Promoted Sites and Promoted Links in SharePoint 2013

Promoted Sites
 
 We can use Promoted list to promote certain sites to users.Sites added here will  appear on sites page in user's My Sites. Use audiences if you want a link to only appear for a specific set of users.

     For doing this we have to configure "User Profile Service" Application, here we can check "Article". Once User profile service is running, then we proceed.Navigate to Application Management in SharePoint central Administration, Select Manage Service Application link. In Service application page click on "User profile service application".choose "Managed Promoted sites" under " My site Settings as shown in fig below.



Now we create links to go click on  "New Link".                                                                                                

Enter Title, URL, Description and select owner and Target Audiences and click "Ok".                                                                                                                                                                                                           


We can check the "Promoted Sites" in "Sites" as shown in fig below.                                                                                                                                                                                                                                    

Promoted Links                                                                                                                                                                                                                                                                                                             In my previous Article  we can check Promoted links.                                                       



                 

                                                                                       


Promoted Links in SharePoint 2013

      It is one of the new feature in SharePoint 2013. Using Promoted links we can Promote your links on various pages.we can see the tiles in SharePoint 2013 team site.

      Now we are going to add promoted list part to show our custom links tiles. To add Promoted links web part,we need to add new app called "promoted list" navigate to "site contents" by clicking on " Add apps" here we can find "Promoted links"app and create new list called "SP Promoted Links" as shown in fig below.




 Open the "Promoted List" , and click on "All Promoted Links" -> "new item" as shown in fig below. one more option to find Add new item in the list, by clicking on the ribbon add new item.                                                                                                              


  
 
Enter title, Background Image location and link location. click on "Save" button. I have it for Ms Office , Windows Azure.







Note:  In "Launch Behavior" we have three options.

 1) In Page navigation
 2) Dialog and
 3) New tab

 In Page navigation
       By selecting "In Page navigation" option, when we clicking on the image, we can see Target location in the same tab.

 Dialog

    The Target location will show in the same page with dialog box.

 New Tab
   Here we can see the Target location in new tab.

Auto Refresh SharePoint list using JavaScript and Content Editor WebPart

When we create and add items List will automatically refresh itself.Using "Content Editor" WebPart and
 JavaScript we can do easily.follow steps to do auto refresh SharePoint list in selected page.


  Edit SharePoint Page, Click on 'Insert' tab from ribbon, Select webpart button to insert the WebPart. From Categories list, select "Media and Content" group , Select "Content Editor" web part and click on add button to insert the web part.


Select web part and choose "Edit web part" from the drop down .                                                  

 
We have to specify the Title to "refresh Page" and Chrome Type to "None" in WebPart edit pane. click on "Ok" .                                                                                                                                                                                        

Now we have to add script to the web page. To do this by clicking the section "click here to add new content" in web part.                                                                                                                             


Cursor will appear in the content area, Don't type anything in the content area, simply go to the ribbon and select "Edit HTML Source" under Format Text.                          

                                                
Enter the following JavaScript to add in the HTML Source box.                                                     

<script type="text/javaScript">
function refreshPage() {
    window.location = window.Location;
}
setTimeout(refreshPage, 300000);
</script>


This Script function is calling every 5 minutes will refresh the page. Finally, Save the Page by Click on 'save' in page tab from ribbon.    
                                                                                                                   



             


Friendly Page URLs in SharePoint 2013

         One of the great improvements in SharePoint 2013 for Web Content Management it the separation of URLs and site hierarchy.Using Managed Navigation now we can define the structure of our site and by tagging the content with the right terms we can ensure that the content will be published at the right location in our website.

         Using Managed Navigation allows you to use friendly URLs without pages and .aspx pages.

To create friendly URL, we are going to modify the Term Store.

-> Go to "site settings"

-> Select "Navigation"
















-> Select "managed navigation" for both Global and current Navigation options.

















->Now we have to select page in Term Store Management Tool -> Select the Page (Here i create new term store, after that i created page(testpage).) Testpage and click "OK".
















->Go to site settings -> "Term Store management" Go to page(Testpage) in navigation and select "Term-Driven pages" option tab , "Customize" option and update the term for the page and click save as shown in figure.

















Once term store has been updated for your page, visit the page ,we can see our friendly page name in the URL.






How to display images in gridview from database using asp.net


In this Article I will explain how to display images in gridview from database
I Created a table with Name Display_Images as shown below.

USE [chinnu]
GO

/****** Object: Table [dbo].[Display_Images] Script Date: 11/07/2013 05:40:28 ******/
SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

CREATE TABLE [dbo].[Display_Images](
[Id] [int] IDENTITY(1,1) NOT NULL,
[ImageName] [nvarchar](max) NOT NULL,
[ImagePath] [nvarchar](max) NOT NULL
) ON [PRIMARY]

GO

Now I am creating an empty web application with name UpLoadimages,After that I am adding a web form with name
DisplayImages.aspx.

I am designing a UI with FileUplod Control ,Button and Grid view.
In DisplayImages.aspx page

<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="DisplayImages.aspx.cs" Inherits="UpLoadimages.DisplayImages" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
<title></title>
</head>
<body>
<form id="form1" runat="server">
<div>
<asp:FileUpload ID="FileUpload1" runat="server" />
<asp:Button ID = "BtnUploadImages" runat = "server" Text = "UploadImages"
onclick="BtnUploadImages_Click" />
</div>
<div>
<asp:GridView ID="gridview" runat="server" AutoGenerateColumns = "false">
<Columns>
<asp:BoundField DataField="Id" HeaderText="Id"/>
<asp:BoundField DataField="ImageName" HeaderText="ImageName"/>
<asp:ImageField DataImageUrlField = "ImagePath" ControlStyle-Height = "50" ControlStyle-Width = "50" HeaderText="Image Preview" />
</Columns>
</asp:GridView>
</div>
</form>
</body>
</html>

In DisplayImages.aspx.cs I am writing the logic to display images in grid view
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Data.SqlClient;
using System.Data;
using System.Configuration;
using System.IO;

namespace UpLoadimages
{
public partial class DisplayImages : System.Web.UI.Page
{
SqlConnection con = new SqlConnection("Data Source=DotNetSharePoint;Database=Chinnu;User Id=sa;Password=Password123;");
protected void Page_Load(object sender, EventArgs e)
{
if (!IsPostBack)
{
BindGridData();
}

}

private void BindGridData()
{
try
{
SqlCommand command = new SqlCommand("SELECT * from Display_Images", con);
SqlDataAdapter da = new SqlDataAdapter(command);
DataTable dt = new DataTable();
da.Fill(dt);
gridview.DataSource = dt;
gridview.DataBind();
}
catch (Exception ex)
{
}

}

protected void BtnUploadImages_Click(object sender, EventArgs e)
{
if (FileUpload1.PostedFile != null)
{
string ImageName = Path.GetFileName(FileUpload1.PostedFile.FileName);
FileUpload1.SaveAs(Server.MapPath("DisplayImages/" + ImageName));
string Query = "Insert into Display_Images(ImageName,ImagePath)" + "values(@ImageName,@ImagePath)";
SqlCommand cmd = new SqlCommand(Query);
cmd.Connection = con;
cmd.Parameters.AddWithValue("@ImageName", ImageName);
cmd.Parameters.AddWithValue("@ImagePath", "DisplayImages/" + ImageName);
cmd.CommandType = CommandType.Text;

con.Open();
cmd.ExecuteNonQuery();
con.Close();


}
}
}
}

In Web.config iam giving the database connection string
<connectionStrings>
<add name="Connstring" connectionString="Data Source=DotNetSharePoint;Database=Chinnu;User Id=sa;Password=Password123;" providerName="System.Data.SqlClient" />
</connectionStrings>

After completing all the steps,Press F5
we can see the output as fallows.