WholeNumber Field Control

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


This Field Control is responsible for displaying or editing whole numbers with no decimal values.

WholeNumber 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 WholeNumber 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#" EnableViewState="false" %>
<%# DataBinder.Eval(Container, "Data") %><asp:Label ID="LabelForPercentage" runat="server" Visible="false" />

Edit view template

<%@  Language="C#" %>
<asp:TextBox CssClass="sn-ctrl sn-ctrl-number" ID="InnerWholeNumber" runat="server"></asp:TextBox><asp:Label ID="LabelForPercentage" runat="server" Visible="false" />


Simple example

   <sn:WholeNumber ID="WholeNumber1" runat="server" FieldName="Number1" />

Templated example

   <sn:WholeNumber ID="WholeNumber1" runat="server" FieldName="Number1">
         <asp:TextBox ID="InnerControl" runat="server"></asp:TextBox>

Related links