Microsoft.SharePoint.WebCon ...


InputFormTextBox Class (Microsoft.SharePoint.WebControls)
Represents the InputFormTextBox.

Namespace: Microsoft.SharePoint.WebControls
Assembly: Microsoft.SharePoint (in microsoft.sharepoint.dll)
Syntax

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
Inheritance Hierarchy

System.Object
   System.Web.UI.Control
     System.Web.UI.WebControls.WebControl
       System.Web.UI.WebControls.TextBox
        Microsoft.SharePoint.WebControls.InputFormTextBox
Thread Safety

Any public static (Shared in Visual Basic) members of this type are thread safe. Any instance members are not guaranteed to be thread safe.
See Also

Tags :


Community Content

jpeterson77
Use following code to get Rich text box in your web part
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);
}
}
}

Tags : contentbug

jpeterson77
Rich Text Menu does not appear over InputFormTextBox
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 :

John Ambadan
Re:Rich Text Menu does not appear over InputFormTextBox
Hi John,

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



John Ambadan
Tags :

johnsonrod
How To Ensure Rich Text Controls Render
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 :

Page view tracker