Number Field Control

From Sense/Net Wiki
Revision as of 15:51, 4 January 2011 by Dobsonl (Talk | contribs) (Examples)

(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search
  • 100%
  • 6.0
  • Enterprise
  • Community
  • Planned


This Field Control is resposible for displaying or editing decimal (fixed-point) numbers.

Number Field Control in edit mode


With Number Field Controls any kind of numeric data can be displayed and edited.

Supported Field types


There are no specific properties defined for this Field Control besides the common properties.

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


The Number 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="InnerControl" runat="server" CssClass="sn-ctrl sn-ctrl-number"></asp:TextBox>


Simple example

   <sn:Number ID="Number1" runat="server" FieldName="Data1" />

Templated example

   <sn:Number ID="ShortText3" runat="server" FieldName="Data1">
         <asp:TextBox ID="InnerControl" runat="server"></asp:TextBox>

Related links