Currency Field Control

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


This Field Control is used for storing a number value in a specified currency.

Currency Field Control in edit mode


In a Currency Field Control number data can be displayed and edited as currency-value. Currency type is set by the adjusted culture on the node.

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 Currency Field Control is a simple Field Control that renders a single TextBox. In Browse mode the value of the Field is rendered thousand separated, and with the type of currency.

Browse view template

<%@  Language="C#" EnableViewState="false" %>
<%# ((SenseNet.Portal.UI.Controls.FieldControl)Container).Field.GetFormattedValue() %>

Edit view template

Has no specific Edit Template, it uses the Number Field's as parent element's Template .

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


Simple example

   <sn:Currency ID="Currency1" runat="server" FieldName="Value1" />

Templated example

   <sn:Currency ID="Currency1" runat="server" FieldName="Value1">
         <asp:TextBox ID="InnerControl" runat="server"></asp:TextBox>

Related links