Wednesday, 9 April 2014

Click node text to expand/collapse instead of +/- icon in treeview

 On a treeview, we can collapse and expand the nodes by clicking the +/- icon. I want to be able to click
the node text to achieve the same results.

We can achieved by using node Id's dynamically and setting the selection node Expand statically.

For Dynamic Treeview, we can implement select action by using node id's.


   TreeNode.SelectAction = TreeNodeSelectAction.Expand;
   Listnode.SelectAction = TreeNodeSelectAction.Expand;

 For static Treeview, We can easily achieved by setting the "selectaction="Expand"" to the Treenode


<asp:TreeView ID="TVID" runat="server">


    <asp:TreeNode Text="Content" SelectAction="Expand">

        <asp:TreeNode Text="Main" SelectAction="Expand">
          <asp:TreeNode Text="SharePoint" SelectAction="Expand">
              <asp:TreeNode Text="SharePoint2013"/>
              <asp:TreeNode Text="SharePoint2010"/>
              <asp:TreeNode Text="SharePoint2007"/>

          <asp:TreeNode Text=".Net" SelectAction="Expand">
              <asp:TreeNode Text="4.0"/>
              <asp:TreeNode Text="3.5"/>
              <asp:TreeNode Text="3.0"/>





By using JavaScript

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

we cannot locate a server to load the workbook data model

The Issue is occurring because the server instance has not been configured in the Central Administration

First Configure the Excel Services service application on the SharePoint server.

Navigate to Application Management click on Manage service applications.

Click on Excel Services service application that you want to configure.

Click on Data Model Settings

Click on Add Server

In that Server Name box,give the name of the analysis services instance that you want to add

Click OK.

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Tuesday, 8 April 2014

Sorry Something Went Wrong

Many times we are getting this error message like Sorry Something Went Wrong with Correlation ID as shown below.

Replace your Correlation  ID and run the script in SharePoint PowerShell,In C drvice with specified file name we get the message related to the Correlation.

Easily we can find the solution.for executing the script it will take few miniutes time.

get-splogevent | where-object {$_.Correlation -eq "9a34859c-60bf-a0da-b50a-fa2880d55674"} | fl message > C:/SPLog.log 

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Thursday, 27 March 2014

how to connect sqlserver using powershell

Here we can find the script the way we can connect sqlserver DB using PowerShell.

$con = New-Object System.Data.SqlClient.SqlConnection
$con.ConnectionString = "Server=servername;Database=databasename;User ID=username;Password=password;"
$sql = "your select query"
$cmd = New-Object System.Data.SqlClient.SqlCommand($sql,$con)
$rdr = $cmd.ExecuteReader()
$test = @()
    $test += ($rdr["fieldname"].ToString())
#here we can see the output using

Write-Output $test

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Wednesday, 26 March 2014

how to send email with attachment in powershell

$Body = "get the information here to show the data with attachement"  | Set-Content C:\somename.html

$file = "C:\somename.html"
$EmailFrom = ""
$EmailTo = ""
$SMTPServer = "Your Smtp Server Name"
$EmailSubject = "Enter Your Subject"
$att = new-object Net.Mail.Attachment($file)

#Send mail with attachment
$mailmessage = New-Object
$mailmessage.from = ($EmailFrom)
$mailmessage.Subject = $EmailSubject
$mailmessage.Body = $Body
$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer)
SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

How to send email using powershell in sharepoint

Here we can see the script,the way we can sent mail alerts using power shell

$EmailFrom = ""
$EmailTo = ""
$SMTPServer = "YourSmtpServerName"
$EmailSubject = "Enter your Subject you want"

$mailmessage = New-Object
$mailmessage.from = ($EmailFrom)
$mailmessage.Subject = $EmailSubject
$mailmessage.Body = "Email body"
#if we are sending any html body we have to use below line
$mailmessage.IsBodyHTML = $true
$SMTPClient = New-Object Net.Mail.SmtpClient($SmtpServer)
#if you want any network credentials set user name and password.
$SMTPClient.Credentials = New-Object System.Net.NetworkCredential("username", "password");

SharePoint Online Real Time Training Contact: JLAKSHMITULASI@GMAIL.COM

Monday, 10 March 2014

How to add extra name infront of Newsfeed(SuiteBarLeft) in SharePoint 2013

    In SharePoint 2013, we can easily add text  in-front of Newsfeed (SuiteBarLeft) in top right side by customizing the master page.

Now we are going to add text(Lakshmi) by using master page, Navigate to SharePoint Designer
  •  Open your SharePoint site what you want...
  •  Click on All Files in left side ->_catalog -> masterpage
  •  I am using default master page Seattle.master, going customizing Seattle.master page. Right click on it Check out and Edit file in Advance mode.
  •  Search for "DeltaSuiteLinks" and add the following code in below as shown in figure.
   <span id="idtextds" class="classtextds">
     <a href="">
       <asp:Label ID="lblds" runat="server" Text="Lakshmi"></asp:Label>

Save and Check In the master page , now we can it as shown below