Posts Tagged ‘SharePoint Webpart’

MOSS21 / Things to remember for webpart development.

Saturday, January 10th, 2009

This article will help you to develop webpart quickly and easily. Remember following things during the werpart development. That will speed up the creation and deployment of the webpart.

Things to remember when creating and deploying webpart to the site:

  • Give Assembly name and namespace name for that right click on the project name in solution explorer and select properties. On Application tab give assembly name and namespace name.
  • On Build tab in output path give the bin directory path of the site on which you want to deploy the web part.
  • Open AssemblyInfo.cs file and add system.security namespace and also add [assembly: AllowPartiallyTrustedCallers()] and then save the file.

MOSS Webpart

  • Open the web.config file of the site on which you have to deploy the web part. Site bin directory is under the vitual directories. Path is C:\Inetpub\wwwroot\wss\VirtualDirectories.
  • In web.config file add safecontrol entry under safe controls section.

MOSS Webpart

  • Also Change the trust level: and change it to Full (Write Full trust level).

MOSS Webpart

  • Deploy the web part.
  • When you deploy the web part the dll of the web part that you have created had been created in the bin directory of that site folder under virtual directories.
  • On the site go to the web parts section. Click on the site settings menu under site action dropdown list and select web part click new tab and select the web part check mark the web part that you have deployed. And click on populate gallery button now you can add a web part on the web part zone.

MOSS Webpart

MOSS Webpart

  • Now you can add the web part on the web part zone.

MOSS18 / Using Content Query Webpart in SharePoint

Friday, October 10th, 2008

This article will show you how to use Content Query webpart for MOSS 2007.

How to use Content Query Web part in MOSS site:

1. How to Add a Content Query Web Part.

Click on Site Actions >> Edit Page

Content Query Webparts

2. Now for add a Content Query Web Part to our page

Click on Add a Web Part

Content Query Webparts

3. Now from the popup window like below from all web part list select checkbox content Query Web Part
And click on Add button.

Content Query Webparts

4. Now click on edit on the right top and then from the popup menu click on modify Shared Web Part Like below.

Content Query Webparts

5. Now Content Query Tool Part is Open.

Content Query Webparts

6. Now you can select from the tool part according to the result you wan’t.

Now Click on + sign on front of Query sub menu is open from that you can select option and according to that result will be generated.
Now from the submenu you can filter out from that

From the source:

If you want to display items from the entire site check radio button in front of that.

If you want to display items from your selected site and sub site then check radio button in front of that click on browse button and select the site as you want items from that to display.

You can also select item from the list

Content Query Webparts

7. You can also filter out your items from the list type as you choose from the dropdown control. Option like document library, custom list, post, task, workflow History, picture library, pages library are there and can choose any option from that.

Content Query Webparts

8. You can also filter out your answer according to content type you choose.

Content Query Webparts

9. You can also filter out your answer from the additional filters menu.
Whichever query you passed according to that the items will be displayed on web part.

10. Click on Presentation menu drop down list is open from that you can sort your answer like descending and ascending and also you can filter your answer group wise.

You can display your items on web part in no. of column as you choose.

You can also limit no. of items to display in web part

Content Query Webparts

11. You can apply group style and item style in no. of ways as you want.

Content Query Webparts

Content Query Webparts

12. You can also change appearance of web part.
Like change title of the web part ,change height and width of a web part.

Content Query Webparts

13. From the Layout menu you can apply direction like right to left, left to right, none for displaying items in web part.

14. You can also place your web part in any zone like Top, bottom left zone, bottom right zone.

Content Query Webparts

Advance menu:

From advanced menu you can select checkbox for item you want to display

Option are Allow minimize, allow close, allow hide, allow zone changes, allow connections.

If allow minimize checkbox is selected then you can minimize your web part

If allow close items is selected then you can close your web part.

Content Query Webparts

After making all the changes Click on ok button or Apply button you web part is display on page like below. When you click on any item you can redirect directly on that page.

Content Query Webparts

MOSS11 / Creating a Solution for SharePoint Server

Wednesday, September 10th, 2008

SharePoint team and Project server team at offshoresoftwaredevelopmentindia.com has great experience of creating web application based on MOSS 2007 and Project server 2007. That includes customization and development of webpart, site definitions, theme development, extension development, module creation. The team has developed CRM application, Job portal, Project management, to CMS applications based on MOSS 2007 and project server 2007.

Team would like to share same experience. This can help who wanted to begin with the sharePoint development and Project Server development.

There are list of articles start with SP and from number 1 to … Always start with the article SP1 and read next article to start working on MOSS easily and quickly.

Creating a Solution:

A solution package is a cabinet (.cab) file with a .wsp file name extension and a manifest file. It can contain the following components:

  • Site definitions
  • Feature definitions and their corresponding element definitions and files
  • Web Part files (*.webpart, *.dwp)
  • Template files and root files, which can include the following:
    1. _layouts files
    2. Resources(*.resx)
    3. Resource files(for example, *.doc or *.xls)
  • Assemblies, which can include the following:
    1. Safe control entries
    2. Resources
  • Code access security policies

Solution files have a hierarchical structure a manifest file is at the root while feature, resource, or site definition directories are contained in subdirectories. In turn, feature definitions define where associated files are located inside of the solution.

The solution creator can define the remaining structure; however, it is recommended that files for a particular feature or site definition be placed in that feature or site definition’s subdirectory.

Note:

The directory structure inside of the .wsp file determines the final directory structure on the front-end Web server file system.

To create a solution package, perform the following steps:

  • Create a solution manifest.xml file.
  • The solution manifest (always called manifest.xml) is stored at the root of a solution file. This file defines the list of features, site definitions, resource files, Web Part files, and assemblies to process. It does not define the file structure if files are included in a solution but not listed in the manifest XML file, they are not processed in any way.

    Following is the structure of a manifest.xml file.

    XML

<Solution SolutionId=”4AFC1350-F354-4439-B941-51377E845F2B” xmlns=”http://schemas.microsoft.com/sharepoint/”>

<FeatureManifests>
<FeatureManifest Location=”FeatureLibrary\feature.xml”/>
</FeatureManifests>
<TemplateFiles>
<TemplateFile Location=”ControlTemplates\Featurelibraryform.ascx”/>
</TemplateFiles>
<RootFiles>
<!– These files go into the 12\ directory and can be used for Web services and global resources –>
<RootFile Location=”ISAPI\MyWebService.asmx”>
</RootFiles>
<Assemblies>
<Assembly DeploymentTarget=”GlobalAssemblyCache”
Location=”ms.samples.sharepoint.myFeature.dll”/>
</Assemblies>

</Solution>

In addition, you can add a DwpFiles element to specify .webpart or .dwp files, or a ResourceFiles element to specify resource files, site definitions, application resources, and code access security policies.

  • Optional. Annotate your feature.xml files with tags.

In the <ElementManifests> tag in your feature.xml file, add <ElementFile Location=”…”/> for all of the extra files in your feature, such as .aspx pages (for example, allitems.aspx) or master pages, and so on.

Note:

This step is required only if your solution contains features.

  • Create your solution package (the .wsp file).

Because the solution file is essentially a .cab file, use the makecab.exe tool to create the solution package. The makecab.exe tool takes a pointer to a .ddf file, which describes the structure of the .cab file. The format of a .ddf file is basically in the same style as the .inf file you declare a standard header and then enumerate, one file per line, the set of files by where they live on disk, separated by where they should live in the .cab file.

Xml

.OPTION EXPLICIT; Generate errors
.Set CabinetNameTemplate=MySolutionFile.wsp
.set DiskDirectoryTemplate=CDROM ; All cabinets go in a single directory
.Set CompressionType=MSZIP;** All files are compressed in cabinet files
.Set UniqueFiles=”ON”
.Set Cabinet=on
.Set DiskDirectory1=Package
build\manifest.xml manifest.xml
build\ MySolutionFile \feature.xml MySolutionFile \feature.xml

Installation Instructions:

Prerequisites:

- Installation package: LHH.PageLayoutsAndLists.wsp

- Flash Player installed on the client to access the site.

From cmd go to: “C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\bin”

  • Adding Solution:

Run this command:
Stsadm.exe -o addsolution -filename C:\Temp\LHH.PageLayoutsAndLists.wsp

  • Deploying Solution:

Run this command
Stsadm.exe -o deploysolution -name LHH.PageLayoutsAndLists.wsp –local -allowgacdeployment

  • Activating Features:

From LHH Portal Site go to Site Actions >> Site Settings >> Modify All Site Settings

Site Collection Features
Activate:
LHH Content Types
LHH Master Page and Page Layouts

  • Referencing content types:

Go to “Site Actions” >> View All Site Content >> Pages
Click on “Document Library Settings”
Click on Advance Settings >> Allow Manage Content Types (True) >> Ok

Then Go to

Site actions -> Site setting -> modify all settings

Site collection administration -> site collection feature

solution site settings

Then you will see the site collection feature list, active our feature from the list. We will have all the features available.

solution site features

  • QUICK QUOTE

     

    cforms contact form by delicious:days

  • CLIENT SPEAKS

    The team at Maven Infosoft has been simply awesome, they provide a great service and are easy to communicate remotely with and have a quick response time.


Country
State / County
City