Monday, May 18, 2009



Hi all,

My Blog has been already moved to MSDN Bangladesh http://msdnbangladesh.net/blogs/ferdous/ .

From now, It is not possible to publish my new post in both place due to the limitation of my time. I am really sorry for that and also request to all of my visitors to go to http://msdnbangladesh.net/blogs/ferdous/  to see my latest post.

I will be greatfull to all of you for giving any kind of feedback there.


Thanks to all


Cheers!!!
MJ Ferdous

Monday, May 11, 2009

This lesson will introduces you One of the new features "Out-of-Browser" experience of Silverlight 3. It will show how to Enable Out-of-Browser Support in Silverlight 3.

The "Out-of-Browser" feature remarkably different than Adobe AIR's approach. From the user's perspective, Out-of-Browser support in Silverlight 3 allows installation directly from the browser. Here, you will find a SlideShow Silverlight Application with enabling Out of Browser Support as well as you can change Title, Discription and default Icon also.

I created a new Silverlight 3 Application using Visual Studio.Net 2008 IDE. Then added a simple slide show control and enabled Out of Browser Support.

E-Learning-VS.Net 2008 Silverlight 3.0-Out of Browser Feature-Lesson 03

Do not forget to give your feedback.

Visit article from www.mrbool.com by register your account. It's free.

Cheers!!!



Saturday, May 09, 2009

How to use Silverlight 3 Child Window or Modal Window Compare to traditional Modal Window such as MessageBox. It will also show you advance use of Child Window by developing a simple SlideShow Control.

You can create a silverlight custom Modal Message Box window using Child window. Silverlight 3 Child Window has built-in Modal feature where you can integrate all the silverlight controls as like as normal silverlight window. You can also a develop a simple custom silverlight image Slide Show Control inside child window by following this lesson (Part 2).

I created a new Silverlight 3 Application using Visual Studio.Net 2008 IDE. Then added one Child Window as Silverlight item to develop Custom MessageBox and added another one for developing a slide show control.

Visit article from www.mrbool.com by register your account. It's free.

E-Learning-VS.Net 2008 Silverlight 3.0-Child Window-Part 1-Lesson 01

E-Learning-VS.Net 2008 Silverlight 3.0-Child Window-Part 2-Lesson 02

Do not forget to give your feedback.

Cheers!!!

Friday, May 08, 2009

A new feature in Silverlight 3 is the Perspective 3D Transforms. The "Perspective 3D" projection feature is a great approach to animate 2D object by putting into 3D space. You can get more flexibility to see different 3D view of 2D control where user can interact dinamically using slider control.

Note that this is not a real 3D, Silverlight does not support 3D yet.

I have created two video lessons in Mr.Bool learning portal for the silverlight developers how to view 3D perspective projection for 2D object in Silverlight 3. Here, you will find a Silverlight media element rotate from different perspective such as from X, Y, Z axis by supporting center of rotation as well as  global and local offset of X, Y, Z.

It is constructed by Creating a new Silverlight 3 Application using Visual Studio.Net 2008 IDE. Then i added media element control and implemented 3D view dinamically using slider control

E-Learning-VS.Net 2008 Silverlight 3.0-Perspective 3D Animation-Part1-Lesson 04

E-Learning-VS.Net 2008 Silverlight 3.0-Perspective 3D Animation-Part2-Lesson 05

 

Do not forget to give your feedback if you like this video. You must register to download this video.

Cheers!!

Tuesday, April 21, 2009

My new article on how to customize New or Edit Form (NewForm.aspx or EditForm.aspx). How to make multiple custom edit form for different item status. How to link those Forms with the list item by creating custom link column

 

When you want to enter a edit item into, let’s say, your Issue Tracker list, SharePoint calls upon the EditForm.aspx page for that list. The page contains a customized List Form Web Part which cannot be edited within the web part, so in order to accomplish this I use SharePoint Designer 2007 tool and Visual Studion.Net Extension for SharePoint List Definition Template. Also I explain how to make different Edit form and depending on the list status the edit link will redirect in different edit page. Here is the technique how to do it.

Get full article from http://www.codeproject.com/KB/sharepoint/SharepointMultipleForm.aspx

Please vote for me if it is useful.

Good Day for all

Monday, March 30, 2009

Microsoft® Silverlight™ 3 Tools Beta 1 can be installed on top of either Visual Studio 2008 SP1 or Visual Web Developer 2008 Express with SP1, and it provides a Silverlight project system for developing Silverlight applications using C# or Visual Basic.

Install Microsoft Silverlight 3 Tools Beta 1 for Visual Studio 2008 SP1 >> Silverlight3_Tools.exe: Add-on for Visual Studio 2008 SP1 for developing Silverlight 3 applications

Install Microsoft Silverlight 3 SDK Beta 1  >> silverlight_sdk.exe: Development Kit provides libraries and tools for developing Silverlight applications.

The Microsoft Silverlight 3 beta runtime

 

Silverlight 3 is going to be the highlight of this year's conference. You can see some important video sesson for silverlight 3 from MIX 09  

What's New in Microsoft Silverlight 3 MIX09-T14F - -

Building Out of Browser Experiences with Microsoft Silverlight 3 MIX09-T45F - -

Building Amazing Business Centric Applications with Microsoft Silverlight 3 MIX09-T40F - -

User Experience Design Patterns for Business Applications with Microsoft Silverlight 3 MIX09-C21F --

 High-Speed RIA Development with the Microsoft Silverlight Toolkit MIX09-T15F --

Sunday, March 29, 2009

Microsoft has packed up Visio stencils for creating diagram of server deployments such as SharePoint Server technology. These models are created using Office Visio 2007. You can modify the Visio files to illustrate how you plan to incorporate Microsoft SharePoint Products and Technologies in your own environment.

 

Ref: http://go.microsoft.com/fwlink/?LinkId=136952

Download this zip file of Microsoft Office Visio stencils to create your own diagrams for models of server deployments.

Cheers!!

Tuesday, March 17, 2009

Monday, March 16, 2009

How to Install and configure MS Office SharePoint Server 2007 in the Production and development Environment

Welcome to setup SharePoint Environment and to read my eBook. This tutorial Book is for the administrator and also developer who are interested to build a stand-alone development environment to build SharePoint web application. I will show here step by step the complete installation procedure of MOSS and pre-requisites installation.  I only attached the most important screen shots for installation and avoided all unnecessary screen-shots because the procedure is little bit longer. Here is the Index for this book.

MOSS 2007 Installation:

  1. Install Windows Server 2003
  2. Windows security update
  3. Install SQL Server 2005
  4. Install Framework 3.0    
  5. Configure SQL server 2005
  6. Install Microsoft SQL Server 2005 Service Pack 2

 

This file cannot be viewed here. You may download it to view it locally. download

 

Hope It will be helpful for you

 

Thursday, February 19, 2009

Sometimes it is necessary to import data from Excel file and insert into SQL Server table or building an automated script for inserting data into SQL Server table or building an automated script for inserting data and save into another excel file to insert later. Today I will discuss all the possibilities to solve this kind of problems.  You need to follow one or more than one steps of the following depending on your requirement.
Step1: How to Import Data from Excel to SQL Server 2005
SQL Server OpenRowSet command makes the data transformation easily. You can use the following simple command to get the data from Import.xls file and stored into new table tmpTable1. You can perform an additional check that the table is already existing or not. You have to specify the parameter for driver, file path and query into OpenRowSet().  
 
SELECT * INTO [dbo].[tmpTable1] FROM OPENROWSET ('Microsoft.Jet.OLEDB.4.0', 'Excel 8.0;Database=c:\Import.xls;','SELECT * FROM [Sheet1$]')
 
Note: The following error could be raised if you do not configure the Surface Area Configuration below.
Error: SQL Server blocked access to STATEMENT 'OpenRowset/OpenDatasource' of component 'Ad Hoc Distributed Queries' because this component is turned off as part of the security configuration for this server. A system administrator can enable the use of 'Ad Hoc Distributed Queries' by using sp_configure. For more information about enabling 'Ad Hoc Distributed Queries', see "Surface Area Configuration" in SQL Server Books Online.
 
Enable OPENROWSET and OPENDATASOURCE SUPPORT  from the Surface Area Configuration to avoid error
 Enable OPENROWSET and OPENDATASOURCE SUPPORT  from the Surface Area Configuration
Step2: How to build a data insert query script programmatically by stored procedure
The following stored procedure will return you the Insert Commands in the result Set. You can copy it from the results Grid and run from the Query Editor on SQL Server 2005 Management Studio
i.e.  EXEC SP_DataInsertScript 'InsertTblName'
===================================================================================
Create Procedure SP_DataInsertScript
@InsertTblName varchar(128)
as
/*
exec SP_DataInsertScript 'InsertTblName'
*/
DECLARE @TblName varchar(128)
SELECT @TblName = 'tmpTable1'
 
   
      create table #temp (id int identity (1,1), ColType int, ColName varchar(128))
 
      insert      #temp (ColType, ColName)
      select case when DATA_TYPE like '%char%' then 1 else 0 end ,
            COLUMN_NAME
      from information_schema.columns
      where       TABLE_NAME = @TblName
      order by ORDINAL_POSITION
     
      if not exists (select * from #temp)
      begin
            raiserror('No columns found for table %s', 16,-1, @TblName)
            return
      end
 
declare     @id int ,
      @maxid int ,
      @cmd1 varchar(7000) ,
      @cmd2 varchar(7000) ,
 
      select      @id = 0 ,
            @maxid = max(id)
      from #temp
 
      select      @cmd1 = 'select '' insert ' + @InsertTblName + ' ( '
      select      @cmd2 = ' + '' select '' + '
      while @id < @maxid
      begin
            select @id = min(id) from #temp where id > @id
 
            select      @cmd1 = @cmd1 + ColName + ','
            from #temp
            where id = @id
 
            select @cmd2 =    @cmd2
                        + ' case when ' + ColName + ' is null '
                        +     ' then '''' '
                        +     ' else '
                        +      case when ColType = 1 then ''''''''' + ' + ColName + ' + ''''''''' else 'convert(varchar(20),' + ColName + ')' end
                        + ' end + '','' + '
            from #temp
            where id = @id         
      end
 
 
      select @cmd1 = left(@cmd1,len(@cmd1)-1) + ' ) '' '
      select @cmd2 = left(@cmd2,len(@cmd2)-8) + ' from ' + @tblName
 
     exec (@cmd1 + @cmd2)
      drop table #temp 
===========================================================================
Step3: How to Dump Insert Query into another Excel File
If you want to dump resultset into Excel File then you need to store the resultset in another temporary table and export from table into Excel file using bcp command. Let me explain it how to do:
DECLARE @QueryString varchar(1000)
SET XACT_ABORT ON
BEGIN TRAN
CREATE TABLE testObjects1 ( QueryString varchar(1000) NOT NULL )
INSERT testObjects1 EXEC SP_DataInsertScript 'InsertTblName'
COMMIT TRAN
 
The above command will store the result set of  into testObjects1 Table. Now you have execute bcp command to export into excel file.

Run the following command from the Query Window

 

EXEC Master..xp_cmdshell 'bcp [dbo].testObjects1 out C:\Result.xls -U {UserName} -P {Pass} -S {ServerName} -T –c{or –n(binary)}'

Note: You have to Enable xp_cmdshell from the Surface Area Configuration to run the above command

You have Enable xp_cmdshell from the Surface Area Configuration to run the above command

OR
You can also run the following command from the command Promt
bcp [dbo].testObjects1 out C:\Result.xls -U {UserName} -P {Pass} -S {ServerName} -T –c{or –n(binary)}
The Result Excel file should be generated with Insert command here C:\Result.xls 

Tuesday, December 02, 2008

How to Customize theme code for MYTHEME theme. It is only necessary if you want to create another one like MYTHEME theme. Here are the instructions of creating Custom Theme with MYTHEME standard.

 

How to: Customize Themes

You can add new themes or customize existing ones for application to Web sites in Microsoft Windows SharePoint Services 3.0. This programming task shows how to customize an existing theme.

To create and customize from an existing theme

  1. Copy one of the theme folders in Local_Drive:\Program Files\Common Files\Microsoft Shared\web server extensions\12\TEMPLATE\THEMES and give the folder a unique name.

Note: In this example, the name is MyTheme. This folder contains cascading style sheets (CSS) files, image files, and other files that define the styles, formatting, and color for the various user interface (UI) elements that are used in the theme.

  1. Find the .inf file in the copied folder, and rename it with the name given to the folder. i.e. in this example rename that .inf file with MyTheme.INF
  2. Open the .inf file and assign the same name to the title in the [info] and [titles] sections of the file.
  3. There is one theme.css file in that MyTheme folder, open that, Customize the styles defined in the following as needed.

Field-Label  Text: It is for all sharepoint text label and field in the form. You have to insert the following code to change in MyTheme standard.

 

Code:

/****Com001: customized for each item field**

Last updated: by MJ Ferdous on 19 nov 08

**/

.ms-formbody {

    background: transparent;

    border-top: 1px solid #ffffff;

}

 

.ms-formlabel  {

    border-top: 1px solid  #ffffff;

    color: #000000;

}

 

h3.ms-standardheader{

color:#000000;

font-weight:normal;

font-family:vardana;

}

/*------------end of Com001:-----------*/

 

Button: You have to integrate the following code in the theme.css inside corresponding theme(i.g. “MYTHEME”) folder to change all button style.

 

Code:

/****Com002: customized for each button**

Last updated: by MJ Ferdous on 19 nov 08

**/

 

.ms-ButtonHeightWidth

{

width:12.0em;

font:8pt verdana;

height:2.1em;

padding-top:0.1em;

padding-bottom:0.4em;

color:#00231b;

background-color:#cbdeda;

border:#00231b 1px solid;

font-weight:bold;

cursor:hand; 

}

 

.ms-NarrowButtonHeightWidth

{

width:9em;

height:2em;

font:8pt verdana;

padding:0;

color:#00231b;

background-color:#cbdeda;

border:#00231b 1px solid;

font-weight:bold;

cursor:hand;

}

 

.ms-ButtonHeightWidth2

{

height:2.1em;

font:8pt verdana;

width:11.72em;

padding-top:0.1em;

padding-bottom:0.4em;

color:#00231b;

background-color:#cbdeda;

border:#00231b 1px solid;

font-weight:bold;

cursor:hand;

}

 

/*------------end of Com002:-----------*/

 

  1. Modify the image files in the copied folder by using the business graphics software of your choice.
  2. Add a file for thumbnail and preview images for your custom theme to the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\IMAGES directory. In this example, the file is called myPreview.gif.
  3. Add a theme template definition to SPTHEMES.XML, which is the file that determines which themes are available as options on the Site Theme page. This XML file is located in the Local_Drive:\Program Files\Common Files\Microsoft Shared\Web Server Extensions\12\TEMPLATE\LAYOUTS\1033 directory.

The following example specifies a template for the custom theme.

Xml

Copy Code

<Templates>
   <TemplateID>mytheme</TemplateID>
   <DisplayName>My Theme</DisplayName>
   <Description>Description</Description>
   <Thumbnail>images/myPreview.gif</Thumbnail>
   <Preview>images/myPreview.gif</Preview>
</Templates>
  1. Reset Internet Information Services (IIS) by typing iisreset at the command prompt so that your custom theme appears in the list of options on the Site Theme page and can be applied to SharePoint sites.

Robust Programming

Warning   Changes that you make to SPTHEMES.XML might be overwritten when you install updates or service packs for Windows SharePoint Services, or when you upgrade an installation to the next version.

 Ref: http://msdn.microsoft.com/en-us/library/aa979310.aspx

 

Sunday, November 30, 2008

Some of my sharepoint video lessons has been published in Mr.bool E-Learning http://www.mrbool.com/portal/ Portal. I am a technical author of this site. You will see more technical lesson in the next days. It is totaly free to download. Please put your important feedback.

Author
MJ Ferdous is Software Engineer professional from 6 years ago. Now he is working in OT Group S.P.A., Italy as Sr. Software Engineer since May 08. He is responsible for research and developent (R & D) on SharePoint 2007 platform and also provides some consultancy for their clients outsite for sharepoint development. He is also owner & modaretor of several groups of sharepoint and asp.net.
http://www.devmedia.com.br/space.asp?id=206364

SharePoint 2007 & VS.Net 2005 Extension for WSS 3.0–Event Receiver–Part 01
In this lesson you will learn how to use Visual Studio 2005 to create a list Event receiver class to handle both synchronous and as asynchronous events.
http://www.mrbool.com/articles/viewcomp.asp?comp=10956

SharePoint 2007 & VS.Net 2005 Extension for WSS 3.0–Event Receiver–Part 02
In this lesson you will learn how to use Visual Studio 2005 to create a list Event receiver class to handle both synchronous and as asynchronous events.
http://www.mrbool.com/articles/viewcomp.asp?comp=11004

SharePoint 2007 & VS.Net 2005 Extension for WSS 3.0–List–Lesson 01
In this lesson you will learn how to customize a list to add columns, more content types, create views as well as saving as template.
http://www.mrbool.com/articles/viewcomp.asp?comp=11091

SharePoint 2007 & VS.Net 2005 Extension for WSS 3.0–List–Lesson 02
In this lesson you will learn how to customize a list Forms to create a new layout for NewForm.aspx, EditForm.aspx using Sharepoint Designer.
http://www.mrbool.com/articles/viewcomp.asp?comp=11178

Thursday, October 30, 2008

Sometime this error has been occured from Windows SharePoint Services Administration command when the user do retractsolution or deploysolution like the follwing

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o retractsolution -name "%PackageName%" -local -url %TargetWebUrl%

or

C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm -o deploysolution -name "%PackageName%" -local -allowGacDeployment -url %TargetWebUrl%

A deployment or retraction is already under way for the solution "xxx.wsp", and only one deployment or retraction at a time is supported

it occurs if anomalies deployment is running for the same package in the backend due to some previous deployment has been crashed before for some reason.

To avoid this problem do the followings: 

Look for the deploy jobId to break the running by the following command:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o enumdeployments
• Cancel the deploy typing the following command:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o canceldeployment-id "GUID jobId"
• Check that deploy has been canceled by typing the following command:
C:\Program Files\Common Files\Microsoft Shared\web server extensions\12\BIN>stsadm-o enumdeployments

Hope it should work.

Tuesday, October 28, 2008

How to customize the EditForm.aspx when you Edit a list item in a SharePoint 2007 list (EditForm.aspx).

 


When you want to enter a edit item into, let’s say, your Issue Tracker list, SharePoint calls upon the EditForm.aspx page for that list. The page contains a customized List Form Web Part that displays default columns associated with the Issue Tracker list properties. The Edit Item form cannot be edited within the browser, so in order for us to accomplish this we have to use SharePoint Designer 2007 tool. Here is the following link that i found how to do it. The blogger explain it for NewForm.aspx in very organized way. In case of EditForm.aspx is the same.

http://sharepoint07.wordpress.com/2008/02/05/customize-the-newformaspx/

Do the following steps to create and customize new edit form:

1. Open your site in SharePoint Designer.
2. Browse to your list and open the 'EditForm.aspx' web form.
3. Go File > Save As... and give the form a new name such as 'EditForm2.aspx'.
4. Delete the default List Form Web Part from the page.
5. Go Insert > SharePoint Controls > Custom List Form.
6. In the List or Document Library Form dialog, select the appropriate list, content type and type of form.
7. Click OK and a new Data Form Web Part is added with controls representing all the fields from the list (in my environment all the controls show "Error Rendering Control" but this does not affect the final result).
8. In the newly added Data Form Web Part, delete the rows containing fields not to be shown / hide to the user (ensure that fields being removed are not required fields without default values as this would prevent the user from submitting the form).
9. At this point, you can do other customization such as rearranging the fields if you wish.
10. Save the site