Click to Rate and Give Feedback
Community Content
In this section
Statistics Annotations (0)
Collapse All/Expand All Collapse All
This page is specific to
The 2007 product release

Other versions are also available for the following:
InputFormTextBox Class (Microsoft.SharePoint.WebControls)
Represents the InputFormTextBox.

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Visual Basic (Declaration)
<ValidationPropertyAttribute("Text")> _
<AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel:=True)> _
<AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level:=AspNetHostingPermissionLevel.Minimal)> _
<SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel:=True)> _
Public Class InputFormTextBox
    Inherits TextBox
    Implements IValidator
Visual Basic (Usage)
Dim instance As InputFormTextBox
C#
[ValidationPropertyAttribute("Text")] 
[AspNetHostingPermissionAttribute(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.LinkDemand, ObjectModel=true)] 
[AspNetHostingPermissionAttribute(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)] 
[SharePointPermissionAttribute(SecurityAction.InheritanceDemand, ObjectModel=true)] 
public class InputFormTextBox : TextBox, IValidator
System.Object
   System.Web.UI.Control
     System.Web.UI.WebControls.WebControl
       System.Web.UI.WebControls.TextBox
        Microsoft.SharePoint.WebControls.InputFormTextBox
Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
Tags What's this?: Add a tag
Community Content   What is Community Content?
Add new content RSS  Annotations
Use following code to get Rich text box in your web part      Gauravthegreat ... jpeterson77   |   Edit   |   Show History
using System;
using System.Security;
using System.Net;
using System.Collections.Generic;
using System.Text;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;

using Microsoft.SharePoint;
using Microsoft.SharePoint.Administration;
using Microsoft.SharePoint.WebControls;

[assembly:AllowPartiallyTrustedCallers]

namespace TestRichTextBox
{
public class TestRTB : WebPart
{
Button _btn = new Button();
InputFormTextBox _txt = new InputFormTextBox();

protected override void CreateChildControls()
{
try
{
_txt.TextMode = TextBoxMode.MultiLine;
_txt.Rows = 10;
_txt.RichText = true;
_txt.RichTextMode = SPRichTextMode.FullHtml;
this.Controls.Add(_txt);

_btn.Text = "Click me";

_btn.Click += new EventHandler(_btn_Click);

this.Controls.Add(_btn);
}
catch (Exception _ex)
{
Page.Response.Write(_ex.ToString());
}
}

void _btn_Click(object sender, EventArgs e)
{
Page.Response.Write(_txt.Text);
}

protected override void Render(HtmlTextWriter writer)
{
RenderChildren(writer);
}
}
}

Rich Text Menu does not appear over InputFormTextBox      jpeterson77   |   Edit   |   Show History
Hi All,
I've been trying to get this Rich Text control working in a custom aspx page. The control renders, but without the rich text editing ribbon on the top. It just looks like a normal multiline textbox. My code for this is below if anyone has any idea why this is happening I would very much appreciate any help. Thanks in advance

Assembly Reference:

<%@ Register Tagprefix="SharePoint" Namespace="Microsoft.SharePoint.WebControls" Assembly="Microsoft.SharePoint, Version=12.0.0.0, Culture=neutral, PublicKeyToken=71e9bce111e9429c" %>

Control Definition:

<SharePoint:InputFormTextBox runat="server" ID="RichTextBox" ValidationGroup="CreateCase" Rows="8" Columns="40" RichText="true" RichTextMode="FullHtml" AllowHyperlink="true" />

John P.
Tags What's this?: Add a tag
Flag as ContentBug
Re:Rich Text Menu does not appear over InputFormTextBox      John Ambadan   |   Edit   |   Show History
Hi John,

May be, you have to add TextMode="MultiLine" to the control definition



John Ambadan
Tags What's this?: Add a tag
Flag as ContentBug
How To Ensure Rich Text Controls Render      johnsonrod   |   Edit   |   Show History
By placing the textbox inside InputFormControl and InputFormSection ... for a sharepoint look and feel you should achieve success in getting the full functionality of the RichTextBox


<cc1:InputFormSectionrunat="server"Title="[TITLE]"Description="[DESCRIPTION]">

<template_inputformcontrols>

<cc1:InputFormControlrunat="server"LabelText="

<cc1:InputFormControlrunat="server"

LabelText="[LABEL_FOR_RICH_TEXT_BOX]">

<Template_Control>

<cc1:InputFormTextBoxID="[ID]"Title="[TITLE]"runat="server"RichTextMode="FullHtml"RichText="true"TextMode="MultiLine"Columns="20"Rows="20"/>

</Template_Control>

</cc1:InputFormControl>

</template_inputformcontrols>

</cc1:InputFormSection>

Tags What's this?: Add a tag
Flag as ContentBug
Processing
© 2009 Microsoft Corporation. All rights reserved. Terms of Use | Trademarks | Privacy Statement
Page view tracker