Wednesday, March 17, 2010

Introduction to Microsoft InfoPath Designer 2010

Asif Rehmani has posted a demo about working with InfoPath Form Designer 2010 at the following link:


Rehmani's demo on Introduction to Microsoft InfoPath Designer 2010


The Following things are the key aspects of InfoPath Designer 2010 that are quite different from that of InfoPath 2007.


  • The New MS Office 2010 has InfoPath Designer 2010 and InfoPath Editor 2010. InfoPath Designer is used to Design the forms and where as InfoPath Editor is used by the end users to fill out the forms.


  • Now lets see InfoPath Designer. The Backstage has various templates, lets design the Blank InfoPath Form and you will be finding the ribbon in it. If you go through the tabs in the ribbon you will be coming across wide range of options available in desigining the InfoPath Forms.


  • Now click on the Insert and click on the first Page layout, and then put the Section layout with in the page layout and then click on the Page Design and in this section you will be having wide range of options that can be applied to our form such as Colors etc.,


  • You can Label the form with respective descriptions such as Name of the form, First name, Last name, Date, Department, Expense Amount and then add controls respectively by adding Textbox, Textbox, Date Picker control, Dropdown and Textbox from the 'Table Tools Layout' in the Home tab from ribbon.


  • In the DataSource Pane you will be finding the respective Datasources ie., field1....field5. Change the DataSources names respectively to FirstName, LastName, Date, Department and ExpenseAmount. You can use the Background color and Border shading etc., fromt he Properties in the Control Tools.


  • Apart from all these, InfoPath Designer 2010 provides controls called Date and Time Picker which is different from Date Picker and moreover this control is not available in InfoPath 2007, in which we can seperately have the Date and Time individually.


  • Most of the properties and customizations in InfoPath Form Designer 2010 can be achieved directly from ribbon which is newly embeded in InfoPath Form Designer 2010.




Lots and Lots of Changes in InfoPath Designer and Editor 2010, desperately waiting for SharePoint Server 2010, MS Office 2010 environment.

Create and Manage SharePoint Content Using SharePoint Designer 2010

Asif Rehmani have given a demo about Creating SharePiont Content using SharePoint Designer 2010 at the following link:

Asif Rehmani's Demo on Creating SharePiont Content Using SharePoint Designer 2010

  • Open SharePoint Designer 2010 -> Click on File Menu and select the top Site and in the Summary page, unser Subsites you will be finding New link, Click on that link to create a subsite to your top site by choosig the respective Site template and click OK to create the Subsite.

  • Now in the new Site that is created, Select Lists and Libraries and then select SharePoint List and then Select Contacts from the ribbon and Create the Lists by giving a name 'Department Contacts'. In the newly created list, if we have to delete any column which is not useful, for eg., 'Company' column then you can you can do that in SharePoint Designer by selecting the newly created List and in the Summary page, you will be seeing a section called Customization, in which you will be finding 'Edit List Columns' and then select the column and click on Delete from the ribbon and save it. And the column will be deleted.

  • And now go to Site Pages and click on Web Part Page and name it and click on it to go to that page. Now click on 'Edit File' link in 'Customization' section or Click on 'Edit File' in the ribbon and select 'Edit File in Normal Mode'. You will find only Content page editable which restricts you from breaking with the Master page. Now Click on 'Insert' from the ribbon, and then Data View and select the newly Created List initially in this list which will place a webpart in the newly created page using a webpart called Xslt List View webpart and then Save it.

Thats it, in this way, you create the Content Types very easily using SharePoint Designer 2010.


If you don't want the site to be there and want to delete i, you can select the Site from the Navigation window and click on Delete from the ribbon but make sure that the deleted site will not be recovered from the recycle bin hence make sure before deleting the site.

Glimpse about SharePoint Designer 2010 User Interface

There was a demo given by Asif Rehmani - Click the following link:

Asif Rehmani's Demo on the introduction to SharePoint Designer 2010

In this demo, he takes us through the SharePoint Designer 2010 Environment/ User Interface.

  • Its a free application available along with Microsoft Office 2010.

  • We need to understand that, SharePoint Designer 2010 is not compatible with SharePoint Designer 2007, it means that, the sites that were built SharePoint Server 2007 cannot be opened with SharePoint Designer 2010.

  • SharePoint Designer 2010 has a ribbon just like any other MS Office applications like Word etc.,

  • We can find a Navigation menu on the left hand side or else we can get the Navigation window from View menu. The ribbon changes depending on the selectin of the menu item in the Navigation window dynamically. for eg., if we are selecting Lists and Libraries in Navigation menu, the ribbon components will change where in it will have options like New Custom List, New SharePoint List, New External List, New Document Libraries etc.,

  • There will be a summary page in the middle which has various things available depending on the selection made in the Navigation menu. for eg., Selecting a site shows you the options such as Site Information, Permissions, Customization, Subsites, Settings etc.,

Create External Content Types using SharePoint Designer 2010

There was a demo given by Asif Rehmani, Click the link below.

Asif Rehmani's Demo on Creating an External Content Type

The demo clearly explains about, how to create an External Content Type using SharePoint Designer for SharePoint Server 2010 sites.

The Key Concepts to understand in this demo are:

  • There will be a ribbon available in both SharePoint Server 2010 and also in SharePoint Designer 2010.

  • The demo shows about creating the external Content Types using SharePoint Designer 2010 and the creation of External Content type starts from Entities tab from New External Content Type

  • In Central Administration of SharePoint 2010, Under Application Management, we will have an option called 'Business Data Catalogs' which will be renamed as 'Business Connectivity Services'

  • The newly created External Content Type is available in this Business Connectivity Services under Manage Option.

  • This newly created Content Types will be available under Site Actions -> Site Settings -> Custom Lists -> External Lists.

  • While creating a new External list from newly created External Content type, we need to give the Name, Description along with Entity Type which is the new Data Connection that we have created in SharePoint Designer 2010 initially shown in the demo.

Have SharePoint Server 2010, SharePoint Designer 2010, then what are you waiting for, the demo gives you clear steps on how to create new External Content Types for SharePoint Server 2010 sites.

Hmmmm.... Desperately waiting for the SharePoint Server 2010 environment.

Friday, March 12, 2010

AJAX Webpart Integrating with SharePoint Site

Scenario: We need to get the data from SQL Server to a webpart based on the Filter conditions given by the End Users.

Pre-requisites: SharePoint Server 2007, Visual Studio 2008/2005, Must have access to SQL Server 2005 database.

Follow the below steps to create an AJAX Gridview webpart to be integrated with SharePoint Sites.


Step 1: First of all, Open Visual Studio 2008 -> New Project -> Visual C# -> SharePoint -> Webpart template. Give a name to your Project and then Click OK.

Step 2: Delete the default webpart1 that is created along with the project from Solution Explorer.

Step 3: Now right click on the Project in the Solution Explorer -> Add New Item -> Visual C# -> SharePoint -> Webpart. Give a name to your Webpart and then Click Add.


Step 4: We will be now adding some namespaces and their respective DLLs as follows.
NOTE: We require these namespaces and DLLs for the gridview and also to connect to the the Database to get the data and display it in the Gridview based on the query.
Name Spaces:
using System.Collections.Generic;
using System.Text;
using System.Web;
using System.Data;
using System.Data.SqlClient;
using System.ComponentModel;
using System.Drawing;

DLLs:
System.Data, System.Data.SqlClient, System.Drawing and System.Web.Extensions (V1.0.6x)
NOTE: Kindly make sure that the version of System.Web.Extensions must be V1.0.6x as we will be having 2 System.Web.Extensions DLLs
Step 5: In order to get the desired webpart properties in which we have a StringConnection, SQL Query, and a Filter Name, in order to achieve this, we need to implement the following code.


a) Add an object for a Grid View Control.

GridView gv = new GridView();
b) //Deifining Controls that are to be used in our Webpart
GridView gv = new GridView();
private GridView gv;
private TextBox txtBox;
private Button btnSearch;
private Label lblMsg;
private Label lblFilterName;
private UpdatePanel updtPanel;
private UpdateProgress updtProgress;
private static readonly object EventSubmitKey = new object();
c)//Adding a variable StringConnection, Connection String, SQL Query and Filter Name

public string strConnection;
[Personalizable(), WebBrowsable(true), WebDisplayName("String Connection"), Category("Data Properties")]

public string SQLQuery;
[Personalizable(), WebBrowsable(true), WebDisplayName("SQL Query"), Category("Data Properties")]

public string filterName;
[Personalizable(), WebBrowsable(true), WebDisplayName("Filter Name"), Category("Data Properties")]

Thursday, March 4, 2010

SharePoint: Forms Based Authentication

In this post, I am going to detail about implementing Forms Based Authentication in SharePoint Server for a Web application.

Scenario: If you have t0 have only Non Domain users to access a specific site and those user credentials will be different from Domain credentials and more over those users have to be created by using ASP.NET Configuration wizard then Forms Based Authentication is the best solution for this scenario.

The following simple steps allow you to create the Forms Based Authentication.

Step 1: Browse to Central Administration -> Application Management -> create or extend Web application -> Create a new Web application. And then create the Site Collection for this site and make sure that you do not open/browse the site yet.




Step 2: Now open the SQL Server Management Studio, and create a new database in SQL Server, by right clicking the Databases and select Create a New Database and then give the name to the database and click on Create - Your new database will be created.


Step 3: Go to Visual Studio 2005 Command prompt and run aspnet_regsql and in the UI, select the newly created database in step 2 and complete the aspnet_regsql wizard.





Step 4: Now open Visual Studio 2005 and create a new Project by selecting ASP.NET Web application template. In the web.config file that is created along with the Project, add the Connection string just above the System.web tag, as below:






Step 5: Now in the Solution Explorer you will be having the aspnet Configuration Icon, click on that icon which takes you to Website Administration Tool in which you need to go to Security Tab and select Authentication type and then select Internet option and then click on Security Tab in which you will be finding the Create Users option. Click on the Create Users option and then create a sample user eg., test.





Step 6: Now go to Central Administration -> Application Management ->Authentication Providers and then change the Authentication type to 'Form' and membership provider name to 'AspNetSqlMembershipProvider'.


Step 7: Add the same connection string just above the system.web tag in Step 4 in both Central Administration Web application's web.config file and also in the SharePoint Web application created in Step 1's web.config file.


Step 8: Now change the SharePoint Web Application's Site Collection Administrator to 'test' created in Step 5. This can be achieved by going to Central Administration -> Application Management tab -> Site Collection Administrators.


Step 9: Close the Central Administration Site.

Step 10: Now open the SharePoint Web Application Site created in Step 1 and you will be finding the login screen in which you have to provide the newly created 'test' user credentials in Step 5.


Followers