Blog

How to Activate MIME Type using Powershell

$mime = “text/html” $webAppUrl = “http://test.company.com” $webApp = Get-SPWebApplication $webAppUrl If ($webApp.AllowedInlineDownloadedMimeTypes -notcontains $mime) { Write-Host -ForegroundColor White “Adding MIME Type “$mime #$webApp.AllowedInlineDownloadedMimeTypes.Add($mime) #$webApp.Update() Write-Host -ForegroundColor Green “MIME Type added and saved.” } Else { Write-Host -ForegroundColor Yellow $mime” MIME type is already

Get document wise versions list using Powershell

function Get-DocumentItemVersionsList([string]$WebURL, [String[]]$listName) { [void][System.reflection.Assembly]::LoadWithPartialName(“Microsoft.SharePoint”) set-variable -option constant -name out -value “C:\Get-ListItemVersionsList_Output.csv” “Item_ID|Item Title|Item URL|Version Count” | Out-File $out -Append write-host “–IN” $web = get-spweb $WebURL write-host “–Web initiated” $list = $web.Lists.TryGetList($listName)

Delete all sharepoint list item using powershell

write-host “Type YES to continue” $retvalue = read-host if ($retvalue -ne “YES”) { write-host “exiting” -foregroundcolor green exit } write-host “continue” $web = get-spweb http://sharepointweburl:2015 $list = $web.lists | where {$_.title -eq “List Name”} Write-host “List $($list.title) has $($list.items.count) entries” $items = $list.items foreach ($item in $items) { Write-host ” ¬†Deleted: $($item.id)”

Responsive GridView for Mobile Phone, Tablet and Desktop display in ASP.Net

In order to make the GridView responsive,You can use Footable jQuery plugin which is compatible with Bootstrap design. To use Footable jQuery include the following code inside the form tag- <link href=”https://cdnjs.cloudflare.com/ajax/libs/jquery-footable/0.1.0/css/footable.min.css”         rel=”stylesheet” type=”text/css” />     <script type=”text/javascript”

Export data table to Excel Sheet(CSV) on Button Click

First You have to Create a grid view that will show details which you want to Export <asp:GridView ID=”GridView1″ CssClass=”footable” runat=”server” AutoGenerateColumns=”false”         Style=”max-width: 500px” >         <Columns>             <asp:BoundField DataField=”Id” HeaderText=”Id” />          

NGenious Solutions