JG Vimalan's Blog

It is all about coding!

InputFormTextBox control in Custom WebPart

The following code snippet will give you an idea of using InputFormTextBox in custom webparts in SharePoint.

private InputFormTextBox _DescriptionTxtBox = null;

protected override void CreateChildControls()
        {
            _DescriptionTxtBox = new InputFormTextBox();
            _DescriptionTxtBox.ID = “descriptionTxtBox”;
            _DescriptionTxtBox.TextMode = TextBoxMode.MultiLine;
            _DescriptionTxtBox.RichText = true;
            _DescriptionTxtBox.RichTextMode = SPRichTextMode.Compatible;
            _DescriptionTxtBox.Rows = 10;

            this.Controls.Add(_DescriptionTxtBox);
        }

//Add: Render the ‘_DescriptionTxtBox’

The output will be,

inputForm

Advertisements

October 10, 2009 - Posted by | SharePoint

1 Comment »

  1. can i use custom textbox in sharepoint webpart?

    Comment by Joseph | November 22, 2010 | Reply


Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: