Return to the menu   Select another DES Module

Demonstrates using blinking error messages to call attention to errors

Add a PageManager control to the page. Then use these properties to establish blinking:

  • BlinkOnChange - Enables the error to blink to catch the user's attention after a change event. It can blink continuously or a specific number of times.
  • BlinkOnSubmit - Enables the error to blink to catch the user's attention after a submit event. It can blink continuously or a specific number of times.
  • BlinkTime - The number of milliseconds to hold each state of a blinking object.

In addition, the Validator control has these properties:

  • BlinkAllowed – When true, blinking is allowed on this error message. Generally you set this to false when blinking does not apply to the individual error message. It defaults to true.
  • BlinkCssClass – A style sheet class name for the blinked state of the error message.


Controls

To show an error, click the button for the BlinkOnSubmit behavior. It will blink continuously. The type 'abc' into the textbox and tab off for the BlinkOnChange behavior. It will blink 3 times.



Source Code (C#)

<script runat="server">
protected void Button1_Click(object sender, EventArgs e) { if (PeterBlum.DES.Globals.WebFormDirector.IsValid) { // save your data here } }
</script> To show an error, click the button for the <span class="PropertyName">BlinkOnSubmit</span> behavior. It will blink continuously. The type 'abc' into the textbox and tab off for the <span class="PropertyName">BlinkOnChange</span> behavior. It will blink 3 times.<br/><br/> <des:PageManager ID="PageManager1" runat="server" BlinkOnSubmit="On" BlinkOnChange="Three" /> <asp:TextBox ID="TextBox1" runat="server" /> <des:RequiredTextValidator ID="RequiredTextValidator1" runat="server" ControlIDToEvaluate="TextBox1" ErrorMessage="Required" > <ErrorFormatterContainer> <des:TextErrorFormatter Display="Dynamic" /> </ErrorFormatterContainer> </des:RequiredTextValidator> <des:DataTypeCheckValidator ID="DTC1" runat="server" ControlIDToEvaluate="TextBox1" DataType="Integer" ErrorMessage="Illegal format. Only digits are allowed." /> <br/> <des:Button ID="Button1" runat="server" Text="Submit" />

Return to the menu   Select another DES Module