C1.Web.Wijmo.Controls.C1BarCode Namespace > C1BarCode Class : EncodingException Property |
'Declaration
<System.ComponentModel.BrowsableAttribute(False)> <C1DescriptionAttribute(Key="C1BarCode.EncodingException", Description="Gets a message to show whether there are some limitations for the type of text barcode can represent.")> <C1CategoryAttribute("Behavior")> Public ReadOnly Property EncodingException As System.Exception
[System.ComponentModel.Browsable(false)] [C1Description(Key="C1BarCode.EncodingException", Description="Gets a message to show whether there are some limitations for the type of text barcode can represent.")] [C1Category("Behavior")] public System.Exception EncodingException {get;}
Most encodings have limitations that determine what type of text it can represent. For example, some are numeric-only and some require text of a specific length.
If the value of the Text property cannot be represented using the current CodeType, then no bar code will be generated and the control will remain blank.
In this case, the EncodingException property returns details about the exception that prevented the bar code from being generated.
this.C1BarCode1.Text = this.TextBox1.Text; Exception exc = this.C1BarCode1.EncodingException; this.Label1.Text = exc == null ? "" : exc.Message;
Target Platforms: Windows 7, Windows Vista SP1 or later, Windows XP SP3, Windows Server 2008 (Server Core not supported), Windows Server 2008 R2 (Server Core supported with SP1 or later), Windows Server 2003 SP2