Wednesday, 28 November 2012

Ajax Control Toolkit working with SharePoint 2010?

In this article,how we can use the Ajax Control Toolkit in Sharepoint 2010.using this sharepoint designer and Visuval studio.


1.Download the Ajax Control Toolkit from this url Click here.

2.Add Ajax Control Toolkit ScriptManager in your master page.Open the Master page in SharePoint Designer.

  •  First register the Ajax Control Toolkit namespace in the masterpage file by putting the following line at the top of the file     
                   <%@ Register Assembly="AjaxControlToolkit, Version=3.0.30930.28736,
                             Culture=neutral, PublicKeyToken=28f01b0e84b6d53e"

                            Namespace="AjaxControlToolkit" TagPrefix="ajaxToolkit" %

  • Then remove the ScriptManager registration from the master page by removing the following line:


  <asp:ScriptManager id="ScriptManager" runat="server" EnablePageMethods="false"
 EnablePartialRendering="true" EnableScriptGlobalization="false" 
 EnableScriptLocalization="true"/>


  • Finally Add the following line in place of the above line to register Ajax Control Toolkit
      <ajaxToolkit:ToolkitScriptManager id="ScriptManager" runat="server" EnablePageMethods="false"
     EnablePartialRendering="true" EnableScriptGlobalization="false" EnableScriptLocalization="true"/>




3.Register Ajax Control Toolkit namespaces in SharePoint package Designer

                    First open the Package designer in Visual Studio (Package usually exists under Package folder in    Visual Studio). And then click the “Advanced” button in package designer window as shown in the image below. In that advanced tab you can add/edit assemblies to be registered safe as part of the deployment of the solution package. Click Add ==> “Add Existing Assembly”. The following image shows wizard to follow.

image

Figure 1: Package Designer’s Advance tab
In the “Add existing Assembly” window, add the following namespaces for Ajax Control Toolkit.


The following image shows the “Add Existing Assembly” window for AjaxControlToolkit dll.

image


Figure 2: Add/Edit Existing Assembly window
Now you can build and deploy the package and as a result of deployment, Ajax Control Toolkit namespaces will be registered as safe controls in web.config.

Adding Items to the Welcome Menu in SharePoint 2010


Adding a new menu item to the SharePoint welcome/user menu is fairly straight forward.

Thanks to Sohels blog for pointing me in the right direction.

First create a new empty SharePoint project in Visual Studio 2010, call it "MenuItemProject".



2011-08-30-AddingItems-01.jpg


Deploy as a farm solution and click finish.


2011-08-30-AddingItems-02.jpg

Add a feature to the project. In the solutions explorer box, right click on the feature node and add feature.


2011-08-30-AddingItems-03.jpg

Also in the solution explorer, right click the top menuItemProject node and add > new item.


2011-08-30-AddingItems-04.jpg

Add an empty Element called "MenuAdditionElement".


2011-08-30-AddingItems-05.jpg

Once added, open the menuAdditionElement > Elements.xml file.


2011-08-30-AddingItems-06.jpg
Replace the Elements.xml code with the following:


<?xml version="1.0" encoding="utf-8"?>
 <Elements xmlns="http://schemas.microsoft.com/sharepoint/">
   <CustomAction
   Id="myCustomAction"
   GroupId="PersonalActions"
   Location="Microsoft.SharePoint.StandardMenu"
   Sequence="1000"
   Title="Google"
   Description="Search away">
     <UrlAction Url="http://www.google.com"/>
   </CustomAction>
 </Elements>

Save the Elements.xml file and then in the solutions explorer double click on the feature1.feature node.


2011-08-30-AddingItems-07.jpg

Ensure the MenuAddition Element is included in the items in the feature.


2011-08-30-AddingItems-08.jpg


Deploy the solution to your SharePoint server.

Once deployed, refresh your site home page and the new menu item should be visible.






Wednesday, 7 November 2012

How to anonymous users access to comment on a SharePoint 2010 blog

First step from the site actions drop down choose view all site content on the blogsite

Click on the comments list 

 And choose list from the ribbon and goto the List permissions as shown below

 You will then need to stop inheriting permissions for this list,
 Once you have broken inheritance your view on the ribbon will change as illustrated below you will need to click on anonymous access
Once clicked you will be presented with the dialogue box below you will have to change the settings to allow Add Items – Add items to lists this will enable your readers to post comments on your new shiny SharePoint Blog.


Friday, 26 October 2012

Import CSV(excel) file to SharePoint list

Here the import the more than documents to add the lists using the Power Shell  Commands.

1.we have to add the title of the list  and body of contents and expire date.its like this

and save as .csv format.

2.After that using this code in Notepad



Add-PsSnapin Microsoft.SharePoint.Powershell –ErrorAction SilentlyContinue
$csv = Import-Csv 'csv file path'

$web = Get-SPWeb -identity "Domin Name"

$list = $web.Lists["ListName"]

foreach ($row in $csv) {
$item = $list.Items.Add();
$item["Title"] =$row.Title
$item["Body"] =$row.Body
$item["Expires"] =$row.Expires
$item.Update()
}
Write-Host "Finished! Press enter key to exit." -ForegroundColor Green
Read-Host


and save as filename.ps1 format.
3.finally exect that file

Automatically created the contents on the particular list.


Wednesday, 17 October 2012

Only JavaScript and html slide show in Share Point


You Have to add the scrip in your Master Page .
 <script type="text/javascript">

var slideimages=new Array()
var slidelinks=new Array()
function slideshowimages(){
for (i=0;i<slideshowimages.arguments.length;i++){
slideimages[i]=new Image()
slideimages[i].src=slideshowimages.arguments[i]
}
}

function slideshowlinks(){
for (i=0;i<slideshowlinks.arguments.length;i++)
slidelinks[i]=slideshowlinks.arguments[i]
}

function gotoshow(){
if (!window.winslide||winslide.closed)
winslide=window.open(slidelinks[whichlink])
else
winslide.location=slidelinks[whichlink]
winslide.focus()
}
    </script>

How to configure the target audience for a web part in SharePoint 2010 sites?


Microsoft Office SharePoint Server 2010 enables custom audience targeting for content and sites. The purpose is to define audiences and content that are relevant to a user or a group. As server or site administrator, you can define audiences and content for a specific set of users or group.
The following steps will teach you how to complete the configuration.
Step 1. Create two users in Active Directory which names are “test1″ and “test2″.







Step 2. Log in SharePoint site with the administrator.
Step3. Go to Site Settings>Site collection features, start the “SharePoint Server Publishing Infrastructure” feature, then go to “Site collection navigation” to check if “Enable audience targeting” is selected.




















Step 4. Go to Site Settings>Site Permission>Create Group, create a group named “testinggroup” whose permission level is Full control, then add “test1″ to this group.















Step 5. Go to Settings>Site Permission >Grant permissions, create a user named “test2″ whose permission level is Full control.








Step 6. Now let me take our product SharePointBoost Password Reset web part as an example. In the web part zone click Edit web part. In the Advanced section of the web part tool pane add the “testinggroup” into the Target Audiences box and click OK.















Step 7. Log in SharePoint with “test1″ and “test 2″ respectively. You will see the difference as below.










When you log in SharePoint with “test1″, you will see the Password Reset web part, and when you log inSharePoint with “test2″, you will not see the web part. This shows we have set the target audience successfully.

Thursday, 11 October 2012

Toggle in Picture Sliding Webpart and Video Webpart in Sharepoint 2010

In this toggle the Video webpart and Sliding webpart in sharepoint using the simple jquery.

1)First add the two webparts in sharepoint site and save it.
2)And than go to the SP designer.
3)Open the Particular Page and find the webpart(Video webpart and Sliding webpart) place.its like below


4)And arranged the with in the <td> tag.(img below)

5)After that create a hyper links on top of div tag.

6)Add the jquery coding on the bottom of the page and also refer the jquery-1.4.1.js.



 <script type="text/javascript">
        $(document).ready(function () {
            $('#slide_toggle').hide();
        });

        $(function () {
            $('#slide_toggle').click(function () {
                $('#slideWebpart').toggle();
                $('#videoWebpart').hide();

                $('#slide_toggle').hide();
                $('#video_toggle').show();
            });
        });

        $(function () {
            $('#video_toggle').click(function () {
                $('#videoWebpart').toggle();
                $('#slideWebpart').hide();

                $('#video_toggle').hide();
                $('#slide_toggle').show();
            });
        });
    </script>

6)finally save the page and see the output.



KendoUI Chart using in AngularJS with Dynamic data

Here i'm going to do the KendoUI Chart using AngularJS  and getting dynamic data from angular services. First need to down-lode the r...