<style type="text/css"> .NegativeText { color : Red; } </style>
WebCurrencyEditor™ allows you to style negative currency values by simply setting the control’s NegativeCssClass property. This will make negative values in the WebCurrencyEditor control apparent.
Place a ScriptManager component and a WebCurrencyEditor control on the WebForm.
Include the following code in your ASPX source to define the negative text CSS class. Once this CSS class is associated to the WebCurrencyEditor control, the text will change to the color red as soon as a negative value is typed into the control.
In HTML:
<style type="text/css"> .NegativeText { color : Red; } </style>
Set the NegativeCssClass property either using the Microsoft® Visual Studio® Property Window or by using the following code:
In Visual Basic:
WebCurrencyEditor1.NegativeCssClass = "NegativeText"
In C#:
WebCurrencyEditor1.NegativeCssClass = "NegativeText";
Save and run your application. Type a negative value in the editor and as soon as the control loses focus you will observe that the CSS class gets applied to the editor similar to the following image: