ShortText Field Control

From Sense/Net Wiki
Jump to: navigation, search
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned


The ShortText Field Control is a Field Control that handles ShortText Fields and provides an interface to display/modify short text data.

ShortText Field Control in edit mode


With ShortText field control textual data can be displayed or edited up to 450 characters. (Longer text will be truncated on save!) Ideal for storing simple descriptions, but also can contain complex HTML formatted text to display custom visualized data.

Supported Field types


For a complete list of common Field Control properties see common Field Control properties.


The ShortText Field Control is a simple Field Control that renders a single TextBox. In Browse mode simply the value of the Field is rendered.

Browse view template

<%@  Language="C#" %>
<%# DataBinder.Eval(Container, "Data") %>

Edit view template

<%@  Language="C#" %>
<asp:TextBox ID="InnerShortText" CssClass="sn-ctrl sn-ctrl-text" runat="server"></asp:TextBox>


Simple example

   <sn:ShortText ID="ShortText1" runat="server" FieldName="Data1" />

Templated example

   <sn:ShortText ID="ShortText2" runat="server" FieldName="Data1">
         <asp:TextBox ID="InnerShortText" runat="server"></asp:TextBox>

Related links