Pages

Friday, 10 October 2014

Top 50 SharePoint Sites

The Top 50 SharePoint Sites:
As SharePoint continues to grow in popularity within organizations large and small, the number of SharePoint related online resources has skyrocketed.

Wednesday, 1 October 2014

SharePoint 2010's Content Query Web Part(CQWP)

The Content Query Web Part is one of three Web Parts provided by SharePoint 2010's publishing sites to display content. The Content Query Web Part allows you to display content from anywhere in your site collection; it’s useful for rolling up content to a home page or creating an archive view of content.
The Content Query Web Part is commonly used to display a list of news articles on a site’s landing page(the first page visitors usually arrive at). Say you have three people creating new articles in your site. You can use the Content Query Web Part to automatically display a list of these articles on your department’s landing page.

The CQWP: What does it do and where can I find it?


The CQWP is an out of the box webpart that, as stated above, enables you to aggregate data. We need aggregation over multiple libraries and we need filtering. Before this little 'gem' makes its appearance, you need to enable it. This is done via the activation of the publishing infrastructure feature.
2013-09-06-SharePointCQWP-02.png
Follow these steps to use the Content Query Web Part:
  1. Insert the Content Query Web Part into your page and edit the Web Part’s properties.
    The Content Query Web Part is located in the Content Rollup section.
  2. In the Query section of the Web Part, select the options that will return the items you wish to see in the Web Part.
    image0.jpg
    The Query section provides many options, including:
    • Source: Select the location in your site hierarchy where you want to query items. If you want to display items regardless of where they appear in your site hierarchy, select the Show Items from All Sites in This Site Collection radio button and select the List Type, Content Type Group, and Content Type you want to display.
      For example, if you want to roll up all project tasks, use your Tasks List Type and List Content Type Group and Task Content Type.
    • List Type: Select the kind of list that stores your items from the drop-down list.
    • Content Type: Select the content type group and content type you want to use for query from the drop-down lists.
    • Audience Targeting: If you want the Web Part to honor any audience targeting settings on the items, select the Apply Audience Filtering check box.
    • Additional Filters: Include any additional fields on which you wish to filter by selecting from the drop-down lists. The list of available fields is determined by the list type and the content type.
      For example, to display all tasks that aren’t started, choose Task Status, Is Equal To, and Not Started from the drop-down lists.
      You can configure more query options for the Content Query Web Part with SharePoint Designer 2010.
      Behind the scenes, this Web Part generates a query with SharePoint’s query language, CAML (Collaborative Application Markup Language). You can write your own custom CAML query to use instead of selecting the options; you can find sites that tell you more about CAML by searching “CAML syntax” in your favorite search engine.
  3. In the Presentation section of the Web Part, select the options that will display your items.
    image1.jpg
    • Grouping and Sorting: Select the columns by which you wish to group results in the Group Items By drop-down list. You can also choose to group results by site by selecting the Site option in the Group Items By drop-down list.
      You can select a column to sort by and limit the number of items displayed by choosing the Sort Items By drop-down list and selecting the Limit the Number of Items to Display check box, respectively, and then entering a number in the Item Limit field.
    • Styles: Select the group style and item style you want to use to display your items from the Group Style and Item Style drop-down lists.
      These styles determine what information appears. For example, Title and Description displays the item’s title field, linked to the document or item, along with the description.
      These styles are XSL templates, not CSS styles. You can create your own XSL templates using SharePoint Designer 2010.
    • Fields to Display: Specify the fields that you want to map to the item style you select by typing them in the Fields to Display text boxes.
      In the case of most documents and articles, the Comments field is the default description field. For items, you have to decide which field you want to use. For example, the Tasks content type uses the Body field. Enter the field name Body in the Description field and the value of that field appears in the Web Part.
    • Feed: Indicate whether you want an RSS feed to be generated for the results of this query by selecting the Enable Feed for This Web Part check box.
  4. Click OK.
    Your query appears in the Web Part.
    image2.jpg

    Tuesday, 30 September 2014

    Difference between Data View Web Part(DVWP) and Content Query Web Part(CQWP)

    Data View Web Part
    1. Need SharePoint Designer to configure it
    2. Displays data/Items with in sub site
    3. Displays data ( items) from only one List/Library
    4. Binds to List/Library GUID
    5. XSLT Style Templates store on Web Part itself
    6. Available on all template
    Content Query Web Part
    1. Can be configurable from Browser
    2. Displays data/Items from Site Collection Level
    3. Displays data (items) based on Content Type
    4. Binds to Content Type
    5. XSLT Style templates stores on ItemsStyle.xsl
    6. Available on Publishing Portal template

    Features of DVWP

    • DVWP can fetch data from data sources other than lists like xml files.
    • DVWP can fetch data from other site collection.
    • DVWP can merge data from more than one list.

    Features of CQWP

    • CQWP can fetch data based on Content Type.
    • You can enable RSS feed in CQWP.
      • RSS feed in CQWP is XSLT based, which gives you option to customize the RSS feed. CQWP uses the /Style Library/Xsl Style Sheets/Rss.xsl file for rendering RSS feeds.
      • Edit the web part and add the “RSS Feed List” as a source.
      • In the Presentation Section under Feed enable feed for the web part. In the Fields to display map the Description list column with the Description slot.
    • You can map list columns with the Page properties.
    • CQWP generates Field to Display which you can map with your custom columns.
      • Slots are reusable templates in which you can map your Column Values without going into the code. CQWP parses the selected Item Style template and generates slots for it: every @Property becomes a slot.
      • We can map custom column values into these slots. E.g. If we a custom column ‘Category’ then we can map its value to ‘Title’ slot as below. Amazing thing is, we do not have to pull our hairs to get the internal name of the column. We just need to write the Display Name of the column to be mapped. So Title will take Category value now.
      • Moreover, you can map more than one column into the slot but only the first non-blank column value will be shown.

    Sunday, 21 September 2014

    Creating Fields or Columns in SharePoint List Programmatically using C# (Single Line Test, Multiline Text, Choice, Number, Currency, Date Time, Lookup, Person or Group)

    Today, in this article let's play around with one of the interesting and most useful concepts in SharePoint List

    Question:Creating Fields or Columns in SharePoint List Programmatically using C#(Single Line Test, Multiline Text, Choice, Number, Currency, Date Time, Lookup, Person or Group)

    It is very easy to add a column in a SharePoint List from website front-end, we just need to click "List Settings -> Create Column" and enter the title and type of the field, and click "OK" button. That's it, new field is created.

    In simple terms "When you create a custom list, a new empty list is created with just two columns - Title and Attachments. The list contains a single default view. Once you create the list, you can add more columns, views, and so on"

    We can use SharePoint API to create these fields and associate the corresponding attributes programmatically within an existing List. Provided below is a code snippet in C#.Net.

    using (SPWeb web = new SPSite("http://kapplesofts/").OpenWeb())
                {
                    web.AllowUnsafeUpdates = true;

                    SPList list = web.Lists["KapplesSofts List"];

                    //Creating List Fields or Columns

                    //single Line Text Field
                    string SLTInternalName = list.Fields.Add("Single Line Text", SPFieldType.Text, false);
                    //'false' means Required field not mandatory
                    //'true' means Required field mandatory 

                    //Multiline Text Field
                    string MLTInternalName = list.Fields.Add("Multiline Text", SPFieldType.Note, false);

                    //Choice Field
                    string fieldStatusName = list.Fields.Add("Status", SPFieldType.Choice, false);
                    SPFieldChoice fieldStatus = (SPFieldChoice)list.Fields.GetFieldByInternalName(fieldStatusName);
                    string[] activityTypes = { "Active", "Closed" };
                    fieldStatus.Choices.AddRange(activityTypes);
                    fieldStatus.DefaultValue = "Active";
                    fieldStatus.Update();

                    //or Choice Field Dropdown
                    SPField fieldCategory = new SPField(list.Fields, "Choice", "Category");
                    list.Fields.Add(fieldCategory);
                    list.Update();
                    SPFieldChoice CategoryField = (SPFieldChoice)list.Fields["Category"];
                    CategoryField.EditFormat = SPChoiceFormatType.Dropdown;
                    CategoryField.Choices.Add("Non Compliance");
                    CategoryField.Choices.Add("Observation");
                    CategoryField.Choices.Add("Suggestion");
                    CategoryField.Choices.Add("Improvement");
                    CategoryField.DefaultValue = "Observation";
                    CategoryField.Update();

                    //or Choice Field RadioButtons
                    SPField field = new SPField(list.Fields, "Choice", "Siverity");
                    list.Fields.Add(field);
                    list.Update();
                    SPFieldChoice rdField = (SPFieldChoice)list.Fields["Siverity"];
                    rdField.EditFormat = SPChoiceFormatType.RadioButtons;
                    rdField.Choices.Add("Major Finding");
                    rdField.Choices.Add("Minor Finding");
                    //DefaultValue empty
                    rdField.Update();

                    //Number Field
                    string NumberInternalName = list.Fields.Add("Number", SPFieldType.Number, false);
                    SPFieldNumber fieldTimeSpent = new SPFieldNumber(list.Fields, NumberInternalName);
                    fieldTimeSpent.DisplayFormat = SPNumberFormatTypes.NoDecimal;
                    fieldTimeSpent.Update();

                    // Currency field
                    string CurrencyInternalName = list.Fields.Add("Salary", SPFieldType.Currency, false);
                    SPFieldCurrency currencyTimeSpent = new SPFieldCurrency(list.Fields, CurrencyInternalName);
                    currencyTimeSpent.Currency = SPCurrencyFieldFormats.India;
                    currencyTimeSpent.DisplayFormat = SPNumberFormatTypes.TwoDecimals;
                    currencyTimeSpent.Update();
            

                    //Date Time Field
                    string fieldInternalName = list.Fields.Add("DOB", SPFieldType.DateTime, false);
                    SPFieldDateTime fieldDateTime = new SPFieldDateTime(list.Fields, fieldInternalName);
                    fieldDateTime.DisplayFormat = SPDateTimeFieldFormatType.DateOnly;
                    fieldDateTime.DefaultValue = "[today]";
                    fieldDateTime.Update();

                    //Lookup Field
                    SPField titleField = list.Fields.GetField("Title");
                    titleField.Title = "Employee Name";
                    titleField.Update();                              
                    SPList lookupList = web.Lists["Sample List"];
                    list.Fields.AddLookup("Employee FirstName", lookupList.ID, false);
                    SPFieldLookup lkp = (SPFieldLookup)list.Fields["Employee FirstName"];
                    lkp.LookupField = list.Fields["Employee Name"].InternalName;
                    lkp.Update();

                    //Boolean Field
                    string BooleanInternalName = list.Fields.Add("Boolean", SPFieldType.Boolean, false);

                    //Person or Group Field
                    string fieldUserName = list.Fields.Add("Employee Name", SPFieldType.User, false);
                    SPFieldUser userField = new SPFieldUser(list.Fields, fieldUserName);
                    userField.AllowMultipleValues = false;
                    userField.Required = false;
                    userField.SelectionMode = SPFieldUserSelectionMode.PeopleOnly;
                    userField.LookupField = "Title";
                    userField.Update();

                    list.Update();

                    web.AllowUnsafeUpdates = false;
                }


    Out Put list new form:

    List setting:

    Getting Started with Development on SharePoint 2010 Hands-on Labs in C# and Visual Basic

    Microsoft released the hands-on lab manuals for SharePoint 2010 to get started learning SharePoint 2010 development. they provided 10 hands on lab manuals, each one is available in C# and VB.NET

    Hope it helps you to learn about SharePoint 2010.


    Click here to Download 10 Lab Manuals

    Wednesday, 10 September 2014

    SharePoint site offline for Maintenance,Update Solution or Site - Quick way to Implement


    Here is the quick way to implement Maintenance page in SharePoint, during upgrade/service pack patching: Create a app_offline.htm file in IIS Root folder of your SharePoint site. Place some descriptive text/images to the file, Make sure the file size is at least 512 bytes (otherwise, you will get 404 page not found error!). That's all!

    File Location: C:\Inetpub\wwwroot\wss\VirtualDirectories\80


    When you have a file called app_offline.htm in your website, ASP.Net will show the content of this file instead of processing all the regular stuff that should happen.
    What does that mean for SharePoint?
    Sometimes you have to run an update, and you wish that no user accesses the site you are updating.

    App_Offline.htm and working around the “IE Friendly Errors” feature

    I've placed the maintenance page content like this:

     <!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>
    <title>Application offline</title>
    </head>

    <body>
    <h1>This application is offline for maintenance</h1>
    <p>
    We are running updates in this system. The application will be available as soon as possible. We are sorry to cause inconvenience.
    </p>
    <!--
        Add some more stuff, so the file size will reach 512 bytes minimum:

        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
        12345678901234567890123456789012345678901234567890
    -->
    </body>

    </html>

    It’s important to place this file into the inetpub-directory. You cannot use this functionality, when you place this file into the root of a SharePoint-site using SharePoint Designer.When ASP.Net finds this file in the directory of the site, its content is sent back to the requesting client.



    Now, we can run our update procedure. But remember, you cannot access the SharePoint site using a browser. You have to use STSADM-commands, PowerShell-cmdlets or your own commandline tools.


    Monday, 1 September 2014

    Sharepoint 2010 Developer Interview Questions and Answers for Experienced

    Q. How does Client object model works?
    Ans. When we use SharePoint client API’s to perform a specific task, the SharePoint Foundation 2010 managed client object model bundles up these uses of the API into XML and sends it to the server that runs SharePoint Foundation. The server receives this request, and makes appropriate calls into the object model on the server, collects the responses, forms them into JavaScript Object Notation (JSON), and sends that JSON back to the SharePoint Foundation 2010 managed client object model. The client object model parses the JSON and presents the results to the application as .NET Framework objects (or ECMAScript objects for ECMAScript).

    Q. How many types of Client Object model extension are available in 2010 and when would you use one or the other.
    Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
    1. .net Managed applications – These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
    2. For Silverlight applications
    3. ECMAScript – It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript.

    Q. What is difference between Load() and LoadQuery() methods ?
    Ans. Load method populates the client object directly with what it gets data from the server i.e. a collection object like ListItemCollection etc. but LoadQuery returns the data as a completely new collection in  IEnumerable format. Other major difference is that the Collections that you load using the Load() method are eligible for garbage collection only when the client context variable itself goes out of scope where as, in  these collections go out of scope at the end of  IEnumerable list.

    Q. How can you write efficient and better performing client object applications?
    Ans. You can always use Lambda expressions in your queries to return only specific properties that will be used in your block. You can also use LoadQuery() method and specify multiple levels of properties to load for e.g. while returning specific properties of the lists using LoadQuery(), you can also specify the fields to return from each list to optimize the data access.

    Q. What are the Authentication methods for your client object model application ?
    Ans.  Basically there are three (3) authentication options you can use when you’re working with the Client Object Model in SharePoint 2010:
    * Anonymous
    * Default
    * FormsAuthentication
    You can specify clientContext.Authentication = Anonymous\Default\FormsAuthentication, If you do not choose an authentication method in your code, the application will default to using the client’s Windows Credentials (DefaultCredentials). 

    Q. How do you access ECMAScript object model API’s?
    Ans. The ECMAScript library is available in a number of JS files in the LAYOUTS folder. The main file among number of .js files is SP.js. When you include this file in the APSX page using a ScriptLink control, all other required JS files are loaded automatically. By linking SP.js to your page, the SP namespace gets registered. SP is the SharePoint namespace that contains all objects. For debugging purposes every js file also has a ‘debug’ equivalent in the same folder.

    Q. What is the purpose of calling clientContext.ExecuteQuery() ?
    Ans. ExecuteQuery gives you the option to minimize the number of roundtrips to the server from your client code. All the components loaded into the clientcontext are executed in one go.

    Q. Why would you use LINQ over CAML for data retrieval?
    Ans. Unlike CAML, with LINQ to SharePoint provider, you are working with strongly typed list item objects. For example, an item in the Announcements list is an object of type Announcement and an item on a Tasks list is an object of type Task. You can then enumerate the objects and get the properties for your use. Also, you can use LINQ syntax and the LINQ keywords built into C# and VB for LINQ queries.

    Q. Can we use our custom master page with the application pages in SharePoint 2010 ?
    Ans. With 2010, you can now set whether the pages under _Layouts use the same Master Page as the rest of your site. You can enable or disable this functionality through the web application settings in Central Administration. This however, is not applicable to your custom application pages. If you want your custom application page to inherit the site master page you must derive it fromMicrosoft.SharePoint.WebControls.LayoutsPageBase class.

    Q. What are WebTemplates and Site Definitions?
    Ans. Site definitions consist primarily of multiple XML and ASPX files stored on a front-end Web server in folders under the %ProgramFiles%\Common Files\Microsoft Shared\web server extensions\14\TEMPLATE\SiteTemplates directory.
    Custom Web templates on the other hand, are stored in the database, and are created using an existing site, with or without its specific content, as a model. This provides a means for reusing sites that you have customized.In some ways, Web templates continue to depend, throughout their lifecycle, on the site definition that is their ultimate foundation.

    Q. How do you write to SharePoint ULS logs in 2010?
    Ans. In SharePoint Foundation, ULS exposes configurable settings in two ways, through the – Object model and Windows PowerShell cmdlets. For writing to SharePoint ULS logs developers can use Diagnostics Service, which will make the customized categories viewable in the administrative UI for our errors.
    or they can use the number of cmdlets available for accessing ULS logs using powershell. Some of the cmdlets are Get-SPDiagnosticConfig ,Get-SPLogEvent etc.

    Q. What does CMDUI.XML contain?
    Ans. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.

    Q.  What has changed in SharePoint 2010 Object model?
    Ans. Microsoft has replaced the “12 hive” structure that we had in SharePoint 2007 with “14 Hive” structure in 2010.
    It has apparently added four new folders to its hive.
    The Folders are :
    * Policy
    * UserCode
    * WebClients
    * WebServices

    Q. How would you deploy WebPart Using Windows PowerShell?
    Ans. At the Windows PowerShell command prompt (PS C:\>), type the below command :
    Install -SPWebPartPack -LiteralPath “FullPathofCabFile” -Name “Nameof WebPart”

    Q. How would you re-deploy the old custom solutions in SharePoint 2010.What Changes are needed to the old Solution files?
    Ans. SharePoint 2010 object model contains many changes and enhancements, but our custom code will still compile and, will run as expected. You should however, rewrite and recompile any code that refers to files and resources in “12 hive”.
    For Details See :
    SharePoint Object Model – Backward Compatibility

    Q. How would you add a link in the Ribbon?
    Ans. You can add any link or Custom Action under any of the existing tabs of the ribbon or can create a new a new tab and place your links under it.

    Q. What does CMDUI.XML contain?
    Ans. The definitions for the out-of-the-box ribbon elements are split across several files in the SharePoint root, with TEMPLATE\GLOBAL\XML\CMDUI.XML being the main one.

    Q. What are the Disadvantages of Using LINQ in your Code?
    Ans. LINQ translates the LINQ queries into Collaborative Application Markup Language (CAML) queries thus adding an extra step for retrieving the items.

    Q. What is different with SharePoint 2010 workflows?
    Ans. Some of the additions in workflow model are :
    1. SharePoint 2010 workflows are build upon the workflow engine provide .Net Framework 3.5.
    2. In addition to the SharePoint lists we can now create workflows for SharePoint sites as well.
    3. SharePoint Designer 2010 also has a new graphical workflow designer for designing workflows and deploying them directly to SharePoint.
    4. Another Improvement in SharePoint Designer 2010 is that it now allows you to edit the out-of-the-box workflows that come with SharePoint.

    Q. How does Ribbon works ?
    Ans. A file called CMDUI.XML stays at the web front end which contains the Out-of-Box site wide Ribbon implementation i.e. all the Ribbon UI for the entire site. In addition to this you have a CustomAction for each ribbon component. These CustomActions have CommandUIExtentions block which has CommandUIDefinitions and CommandUIHandlers which make up the activity of the ribbon component. So, when the ribbon is loaded the CommandUIDefinition merges with Out-of-Box definition in the CMDUI.XML

    Q. How will you use WebParts or other solutions Created in SharePoint 2007 in SharePoint 2010 ?
    Ans. In SharePoint 2010 the 12 hive is now replaced by 14 hive, So we will rewrite and recompile any code that refers to files and resources in “12″ hive. In addition to we must recompile custom code written for Windows SharePoint Services 3.0 and Office SharePoint Server 2007 that does not run on IIS.

    Q. What is the advantage in using Windows PowerShell over stsadm in SharePoint 2010 ?
    Ans. Unlike stsadm, which accept and return text, Windows PowerShell is built on the Microsoft .NET Framework and accepts and returns .NET Framework objects. Windows PowerShell also gives you access to the file system on the computer and enables you to access other data stores, such as the registry and the digital signature certificate stores etc..

    Q. What is REST? How is it used in SharePoint 2010?
    Ans. REST (Representational State transfer) is a protocol (powered by ADO.NET services) which is used for getting data out of SharePoint via Url. It is mostly used to access data from SharePoint even when you are not in the SharePoint context.

    Q. What data type is returned by REST ?
    Ans. REST does not return an object of type SharePoint Site\List. Instead, it returns an XML output.

    Q. What is a workflow?
    Ans. Workflows are the way organization functions, a series of actions that correspond to a work process, such as the process for purchase orders. SharePoint 2010 helps you automate these workflows, thereby increasing the efficiency and productivity of the organization.

    Q. What are the types of workflow that you can design in SharePoint 2010.
    Ans. you can design List Workflows, Reusable List Workflows and Site workflows using SharePoint designer 2010.

    Q. What Reusable List Workflows and Site workflows?
    Ans.  
    Reusable List Workflows -
    You can create a reusable list workflow (reusable workflow) in the top-level site in the site collection, and that workflow can be made globally reusable — meaning that the workflow can be associated to any list, library, or content type in the site collection. You can also create a reusable workflow in any subsite in the site collection; this workflow is available for reuse in that particular subsite.
    Site workflows - A site workflow is associated to a site — not to a list, library, or content type. So unlike most workflows, a site workflow is not running on a specific list item. Because of this, many of the actions that is available for items not available for site workflows.

    Q. Can you modify the Out-of-Box workflows in SharePoint 2010?
    Ans. In SharePoint 2010, you have an option to customize the Out-of-Box workflows. The four most popular workflows in SharePoint Server 2007 — the Approval, Collect Feedback, Collect Signatures, Publishing Approval workflows — have been completely rebuilt as declarative reusable workflows, meaning that they are now fully customizable in SharePoint Designer 2010.

    Q. What are events, actions, conditions and steps?
    Ans. Lets look at this one by one.
    Events - An event is what starts or initiates a workflow. Events can also be used to manage the timing of actions within a workflow, such as waiting for the status of an item to change. There are three events that can start a workflow:
    * An item is created.
    * An item is changed.
    * A workflow participant clicks a start button on the SharePoint site.

    Actions – An action is the most basic unit of work in a workflow. SharePoint Designer 2010 provides a set of ready-made, reusable actions for you to incorporate into your workflow.
    For example, your workflow can:
    * Create, copy, change, or delete list items (including documents).
    * Check items in or out.
    * Send an e-mail message.
    Conditions - When you design a workflow, you can use the workflow editor to create rules that apply conditional logic to SharePoint sites, lists, items and content types. A rule establishes a condition where the workflow performs the associated action only if that condition is true. For example, you can create a rule where the workflow sends a reviewer an e-mail message only if an item is created by a specific person.

    Q. What are Parallel and Serial actions?
    Ans. When you have more than one action associated with a condition, the actions can be set up to run at the same time (parallel) or one after another (serial), the default.

    Q. What are the Types of forms associated with the workflow?
    Ans. With SharePoint Designer 2010, you can create three types of workflow forms:
    Initiation form – An initiation form gathers information from the workflow participant when they start the workflow. It is automatically generated when you create the workflow in SharePoint Designer 2010. Initiation forms are displayed to users when they manually start a workflow on a given SharePoint item. With an initiation form, users can specify additional parameters or information about the workflow as it applies to the given SharePoint item.

    Task form – A custom task form allows workflow participants to interact with tasks in the Tasks list specified for the workflow. With the Custom Task Wizard, you can easily create custom form fields and add them to a custom task form. When you finish designing the workflow, SharePoint Designer 2010 automatically generates the InfoPath or ASP.NET forms for your custom tasks.
    Reusable workflow – association form – A reusable workflow, by default, only provides the fields common to all items, such as Created and Modified by. This is because a reusable workflow isn’t by default associated with a list, library, or content type. An association form enables you to associate fields with a reusable workflow so that the fields will be available when you design and run the workflow.

    Q. When are these forms get created? And how do you customize it ?
    Ans. SharePoint Designer 2010 automatically generates the forms, but you can customize them by going to the settings page for the workflow, in the Forms section, click the form you want to customize. Workflow forms are either InfoPath or ASP.NET pages. They are stored on the SharePoint site with the workflow source files.

    Q. How will you deploy files such as Css, js in SharePoint 2010?
    Ans. The most preferable way to deploy files in SharePoint is by using the solution package. In SharePoint 2010 you can create an empty project with VS 2010 and then add a new SharePoint Mapped folder in it. This will give the desired location in 14 hive where you can then add a file to deploy.

    Q. Can you display a page as a modal dialog?
    Ans. Yes, any page can be displayed as modal dialog. A Modal dialog takes options as a parameter and we can specify the url for any page usually saved in _layouts.

    Q. Can you display the modal dialog from a webpart?
    Ans. Yes a modal dialog can be displayed from within a webpart code since its a JavaScript block that can be registered on the page.

    Q. What is difference between an Application page and a Custom aspx page in SharePoint 2010. If you have to deploy a page with some code in it which one would you prefer?
    Ans.
    Application Page – You would typically use an application page when you need some content that is merged with SharePoint master page. A master page enables application pages to share the same appearance and behavior as other pages on a site. Application page generally gets deployed in _layouts and inhertirs the look and feel of the site that you are using.
    A Custom .net aspx page on the other hand would need content and master page tags in your page to make it inherit the look and feel of the site.
    I would prefer deploying an application page with code as it is much easier and has built-in templates available in VS 2010.

    Q. What is Docuement Set and how is it useful to the end users?
    Ans. A Document Set is a group of related documents that can be created in one step and then managed as a single entity. This can be seen as a folder of documents with a cover letter(welcome page) and which can share common data between its documents (share document set info\columns).
    Document Set is very useful when it comes to managing the documents for a single project or task. For e.g. a manager while working on a project wants to create a single folder\entity with all the documents related to that project. He also wants that each document shares the project info (for e.g. Project Id, Manager name etc.) and can be checked in\checked out individually. Document Set will also allow him to add a cover letter\welcome page to the entity(or his set of documents) and use some basic document features like record version history, start a workflow, e-mail document set etc.

    Q. What are Projected Fields in SPQuery and when would you use that?
    Ans. In SharePoint 2010, Referential integrity can now be implemented using Lookup columns. Joins and ProjectedFields properties of SPQuery were introduced to facilitate this. Projected Fields are the fields which you can access when a list is joined by a lookup solumns. These are additional columns from a parent lookup column list.

    Q. What is WebProvisioned event receiver and when would you use that?
    Ans. WebProvisioned event receiver is fired after the site has been created and is fully provisioned (asynchronous). For e.g. if you want to update the site title of logo after its been created or if you want to add a new list\library after the out-of-box site has been created you can use the WebProvisioned event handler.

    Q. If you have to add a new Ribbon button to one of the existing tabs how will you identify the location?
    Ans. The Its typically Ribbon.Tabs.group.Controls._children.

    Q. How would you re-deploy the old custom solutions in SharePoint 2010.What Changes are needed to the old Solution files.
    Ans. SharePoint 2010 object model contains many changes and enhancements, but our custom code will still compile and, will run as expected. You should however, rewrite and recompile any code that refers to files and resources in "12 hive".
    For Details See: SharePoint 2010 Object Model - Backward Compatibility

    Q. How many types of Client Object model extension are available in 2010 and when would you use one or the other.
    Ans. To develop rich client side solutions, three set of client-side APIs has been introduced in the Microsoft.SharePoint.Client namespace. The three APIs are targeted for three different types of clients.
    1. .net Managed applications – These are used when we have to create console applications or window applications, web applications which are not running inside SharePoint Contex.
    2. For Silverlight applications
    3. ECMAScript – It is a client object model extension for using with JavaScript or JScript. This is used for creating applications which are hosted inside SharePoint. For example, web part deployed in SharePoint site can use this JavaScript API for accessing SharePoint from browser using JavaScript.

    Q. What are the security improvements in SharePoint 2010?
    Ans. In SharePoint 2010 a variety of security methods have been introduced.
    Claims-Based Authentication - Claims based authentication is based on identity. and trust.
    Code Access Security - in which you can specify your own code access
    security (CAS) policy for your web parts.
    Sandbox Solutions - Sandbox Solutions which when deployed to the server, SharePoint runs in a special process that has limited permissions.
    Cross-Site Scripting - Introduced to prevent Cross - Site Scripting (XSS) attacks.

    Q. Whats New with SharePoint WebParts?
    Ans. A developer can create two types of webparts using Visual Studio 2010.
    1. Visual Webparts - Allows you to Drag and Drop the controls from the Toolbox to WebPart Design surface. You can of course write your custom code in the code file. You can also package and deploy your webparts directly to Sharepoint from VS by pressing Clt+F5. Visual studio 2010 also provides you with three different views for developing webparts. The views are split view, design view and Source view(as we have in designer 2007).

    Note: The Visual Webpart project Item basically loads a User Control as a WebPart.
    2. ASP.Net WebParts - Where a developer can build up User Interface and logic in a class file. You do not have designer for drag and drop of controls. This webpart inherits from standard ASP.Net webpart. For Deployment we can again use ctrl+f5 to deploy this webpart.

    Q. What are the Visual Studio 2010 Tools for SharePoint.
    Ans. Visual Studio 2010 includes SharePoint-specific project types and project item types, and includes powerful packaging, deployment, and debugging features that help increase your efficiency as a SharePoint 2010 developer.
    Some of the Templates avaiable are :
    1.Visual Web Part project template.
    2. List defination template.
    3. Content Type template.
    4. Empty Project template.
    5. Event Receiver template.
    6. some workflow template.
    7. the Site Definition template
    and many more....

    Q. What are SharePoint Sandboxed soultions ?
    Ans. SharePoint 2010 provides a new sandboxed environment that enables you to run user solutions without affecting the rest of the SharePoint farm. This environment means that users can upload their own custom solutions without requiring intervention from administrators, and without putting the rest of the farm at risk. This means that the existing sites\pages or components will not be effected by the newly added soultion.
    Users can deploy the below four things as sandboxed soultions :
    1. WebParts.
    2. Event Receivers.
    3. List Definations.
    4. Workflows.

    Q. What are Requirenments for SharePoint 2010.
    Ans. SharePoint Server 2010 will support only 64 - bit. It will require 64 bit Windows Server 2008 or 64 bit Windows Server 2008 R2. In addition to this, it will require 64 bit version of SQL Server 2008 or 64-bit version of SQL Server 2005.

    Q. What is LINQ. How is it used in Sharepoint ?
    Ans. LINQ is a feature of the programming languages C# 3.0 and Visual Basic .NET. LINQ allows you to query in an object-oriented way, supports compile-time check, gives you intellisense support in Visual Studio and defines a unified, SQL like syntax to query any data source. But unlike other languages and query syntaxes which vary from one type of data source to another, LINQ can be used to query, in principle, any data source whatsoever. It is commonly used to query objects collections, XML and SQL server data sources.
    The LINQ to SharePoint Provider is defined in the Microsoft.SharePoint.Linq namespace. It translates LINQ queries into Collaborative Application Markup Language (CAML) queries.

    Q. What Changes are made in SharePoint 2010 to enforce Referential Integrity?
    Ans. In SharePoint 2010, Referential Integrity is enforced using two options, available with Look-up columns.
    While creating a Look-up column, you can either choose a) Restrict Delete or b) Cascade Delete to define a relationship between the Look-up list and the list containing the look-up Column. Read Details at SharePoint 2010 Referential integrity - Using LookUp Column

    Q . Whats New in SPALerts ?
    Ans. In SharePoint 2007, alerts were send only through e-mails, but in SP2010 users can also send an alert to mobile devices as SMS Message. A New property DeliveryChannels is introduced to indicate, whether the alert is delivered as E-mail or as an SMS Message.

    Q. What Has Changed with SSP in SharePoint 2010.
    Ans. In SharePoint 2010 Shared Service Providers (SSP's) are replaced by Service Applications. Services are no longer combined into a SSP. They are running independent as a service application. The service application architecture is now also built into Microsoft SharePoint Foundation 2010, in contrast to the Shared Services Provider (SSP) architecture that was only part of Office SharePoint Server 2007.
    A key benefit here is that all services are installed by default and there is no SSP setup.