WYSIWYG

http://kufli.blogspot.com
http://github.com/karthik20522

Wednesday, June 10, 2009

FreeTextBox 3.1.6 (FTB) in Sharepoint 2003 (WebPart)

I have noticed that many programmers/users have failed to implement FreeTextBox onto Sharepoint portal (WebPart). Well it's very much possible and also easy to do so. We could skip all the Registering FTB on aspx page and RUNAT server tags and stuff like those which are hard to implement in Sharepoint Server. Below is a step-by-step implementation of FreeTextBox control on Sharepoint portal as a WebPart.

1. As per the original FTB documentation, we need to copy all the FTB support files into a directory. Over here, I have copied onto the default Sharepoint 2003 images directory.(C:\Program Files\Common Files\Microsoft Shared\web server extensions\60\TEMPLATE\IMAGES\FreeTextBox)


2. We need to then add FreeTextBox.DLL (provided in FreeTextBox zip/setup package) onto GAC (Global Assembly Cache) either by using GACUTIL.exe or using .NET Configuration Manager in Control Panel -> Administrative Tools. Choose the appropriate FTB DLL based on .NET version being used.

Step 1 and Step 2 end's the setup process which is more simpler than the original setup methodology like referencing axd file, adding "Register" on top of the aspx page and runat server tags and adding in web.config file. What an hazel !! :)

3. First we need to add FreeTextBox reference in out WebPart Project. Add the following line of code onto ur .cs file.




4. Then need to initialise the control. Add the following code in "protected override void CreateChildControls()" method.

5. Add tBox.RenderControl(output) in "protected override void RenderWebPart(HtmlTextWriter output) method.
THAT'S IT....U have now FTB on your WebPart!!

Labels: ,