Skip to main content

LinearBarcode

Version: 1.0

LinearBarcode

LinearBarcode​

Represents linear barcode control.

public class LinearBarcode : WebControl, IAttributeAccessor, IComponent, IControlBuilderAccessor, IControlDesignerAccessor, IDataBindingsAccessor, IDisposable, IExpressionsAccessor, IParserAccessor, IUrlResolutionService
Public Class LinearBarcode
Inherits WebControl
Implements IAttributeAccessor, IComponent, IControlBuilderAccessor, IControlDesignerAccessor, IDataBindingsAccessor, IDisposable, IExpressionsAccessor, IParserAccessor, IUrlResolutionService

Inheritance: Object → Control → WebControl → LinearBarcode

Implements: IAttributeAccessor, IComponent, IControlBuilderAccessor, IControlDesignerAccessor, IDataBindingsAccessor, IDisposable, IExpressionsAccessor, IParserAccessor, IUrlResolutionService

Licensing​

This class is a DynamicBarcode Creator feature. The following license is required for non-evaluation usage:

  • DynamicBarcode Creator for .NET

Constructors​

LinearBarcode()​

Creates the LinearBarcode control.

public LinearBarcode()
Public Sub New ()

Properties​

AccessKey​

Gets or sets the access key that allows you to quickly navigate to the Web server control. (Inherited from WebControl)

public string AccessKey { get; set; }
Public Property AccessKey As String

Property Value​

String

Exceptions​

The specified access key is neither , Empty nor a single character string.

AlternateText​

Gets or sets the alternate text of the barcode image.

public string AlternateText { get; set; }
Public Property AlternateText As String

Property Value​

String

AppRelativeTemplateSourceDirectory​

Gets or sets the application-relative virtual directory of the Page or UserControl object that contains this control. (Inherited from Control)

public string AppRelativeTemplateSourceDirectory { get; set; }
Public Property AppRelativeTemplateSourceDirectory As String

Property Value​

String

Attributes​

Gets the collection of arbitrary attributes (for rendering only) that do not correspond to properties on the control. (Inherited from WebControl)

public AttributeCollection Attributes { get; }
Public Property Attributes As AttributeCollection

Property Value​

AttributeCollection

BackColor​

Gets or sets the background color of the barcode.

public Color BackColor { get; set; }
Public Property BackColor As Color

Property Value​

Color

BarcodeMargin​

Gets or sets The margin of the control in pixels (at 96dpi).

public Margin BarcodeMargin { get; set; }
Public Property BarcodeMargin As Margin

Property Value​

Margin

BarColor​

Gets or sets the bar color of the barcode.

public Color BarColor { get; set; }
Public Property BarColor As Color

Property Value​

Color

ClientID​

Gets the control ID for HTML markup that is generated by ASP.NET. (Inherited from Control)

public string ClientID { get; }
Public Property ClientID As String

Property Value​

String

ClientIDMode​

Gets or sets the algorithm that is used to generate the value of the ClientID property. (Inherited from Control)

public ClientIDMode ClientIDMode { get; set; }
Public Property ClientIDMode As ClientIDMode

Property Value​

ClientIDMode

Controls​

Gets a ControlCollection object that represents the child controls for a specified server control in the UI hierarchy. (Inherited from Control)

public ControlCollection Controls { get; }
Public Property Controls As ControlCollection

Property Value​

ControlCollection

ControlStyle​

Gets the style of the Web server control. This property is used primarily by control developers. (Inherited from WebControl)

public Style ControlStyle { get; }
Public Property ControlStyle As Style

Property Value​

Style

ControlStyleCreated​

Gets a value indicating whether a Style object has been created for the ControlStyle property. This property is primarily used by control developers. (Inherited from WebControl)

public bool ControlStyleCreated { get; }
Public Property ControlStyleCreated As Boolean

Property Value​

Boolean

CssClass​

Gets or sets the Cascading Style Sheet (CSS) class rendered by the Web server control on the client. (Inherited from WebControl)

public string CssClass { get; set; }
Public Property CssClass As String

Property Value​

String

Dpi​

Gets or sets the DPI used to output the barcode.

public Nullable&ltfloat> Dpi { get; set; }
Public Property Dpi As Nullable(Of Single)

Property Value​

Nullable&ltfloat>

Enabled​

Gets or sets a value indicating whether the Web server control is enabled. (Inherited from WebControl)

public bool Enabled { get; set; }
Public Property Enabled As Boolean

Property Value​

Boolean

EnableTheming​

Gets or sets a value indicating whether themes apply to this control. (Inherited from WebControl)

public bool EnableTheming { get; set; }
Public Property EnableTheming As Boolean

Property Value​

Boolean

EnableViewState​

Gets or sets a value indicating whether the server control persists its view state, and the view state of any child controls it contains, to the requesting client. (Inherited from Control)

public bool EnableViewState { get; set; }
Public Property EnableViewState As Boolean

Property Value​

Boolean

GS1DataBarType​

Gets or sets the type of gs1 databar barcode to display in the control when the LinearBarcodeType is GS1DataBar.

public GS1DataBarType GS1DataBarType { get; set; }
Public Property GS1DataBarType As GS1DataBarType

Property Value​

GS1DataBarType

HasAttributes​

Gets a value indicating whether the control has attributes set. (Inherited from WebControl)

public bool HasAttributes { get; }
Public Property HasAttributes As Boolean

Property Value​

Boolean

ID​

Gets or sets the programmatic identifier assigned to the server control. (Inherited from Control)

public string ID { get; set; }
Public Property ID As String

Property Value​

String

InlineImage​

Gets or sets if an inline image will be used for the barcode.

public bool InlineImage { get; set; }
Public Property InlineImage As Boolean

Property Value​

Boolean

LinearBarcodeType​

Gets or sets the type of barcode to display in the control.

public LinearBarcodeType LinearBarcodeType { get; set; }
Public Property LinearBarcodeType As LinearBarcodeType

Property Value​

LinearBarcodeType

MsiAppendCheckDigit​

Gets or sets if a check digit should be added to an MSI barcode.

public Nullable&ltMsiBarcodeCheckDigitMode> MsiAppendCheckDigit { get; set; }
Public Property MsiAppendCheckDigit As Nullable(Of MsiBarcodeCheckDigitMode)

Property Value​

Nullable&ltMsiBarcodeCheckDigitMode>

NamingContainer​

Gets a reference to the server control's naming container, which creates a unique namespace for differentiating between server controls with the same ID property value. (Inherited from Control)

public Control NamingContainer { get; }
Public Property NamingContainer As Control

Property Value​

Control

Page​

Gets a reference to the Page instance that contains the server control. (Inherited from Control)

public Page Page { get; set; }
Public Property Page As Page

Property Value​

Page

Exceptions​

The control is a Substitution control.

Parent​

Gets a reference to the server control's parent control in the page control hierarchy. (Inherited from Control)

public Control Parent { get; }
Public Property Parent As Control

Property Value​

Control

RenderingCompatibility​

Gets a value that specifies the ASP.NET version that rendered HTML will be compatible with. (Inherited from Control)

public Version RenderingCompatibility { get; set; }
Public Property RenderingCompatibility As Version

Property Value​

Version

ShowText​

Gets or sets if the text value of the barcode is shown below the barcode.

public bool ShowText { get; set; }
Public Property ShowText As Boolean

Property Value​

Boolean

Site​

Gets information about the container that hosts the current control when rendered on a design surface. (Inherited from Control)

public ISite Site { get; set; }
Public Property Site As ISite

Property Value​

ISite

Exceptions​

The control is a Substitution control.

SkinID​

Gets or sets the skin to apply to the control. (Inherited from WebControl)

public string SkinID { get; set; }
Public Property SkinID As String

Property Value​

String

Exceptions​

The skin specified in the SkinID property does not exist in the theme.

Style​

Gets a collection of text attributes that will be rendered as a style attribute on the outer tag of the Web server control. (Inherited from WebControl)

public CssStyleCollection Style { get; }
Public Property Style As CssStyleCollection

Property Value​

CssStyleCollection

SupplementValue​

Gets or sets the supplement value of the barcode. Only applies to UPC/EAN barcodes that have a supplement value.

public string SupplementValue { get; set; }
Public Property SupplementValue As String

Property Value​

String

SupportsDisabledAttribute​

Gets a value that indicates whether the control should set the attribute of the rendered HTML element to "disabled" when the control's IsEnabled property is . (Inherited from WebControl)

public bool SupportsDisabledAttribute { get; }
Public Property SupportsDisabledAttribute As Boolean

Property Value​

Boolean

SymbolHeight​

Gets or sets the height of the barcode in points. This does not include the text (if it is shown) on non UPC/EAN barcodes.

public Nullable&ltfloat> SymbolHeight { get; set; }
Public Property SymbolHeight As Nullable(Of Single)

Property Value​

Nullable&ltfloat>

TabIndex​

Gets or sets the tab index of the Web server control. (Inherited from WebControl)

public short TabIndex { get; set; }
Public Property TabIndex As Int16

Property Value​

Int16

Exceptions​

The specified tab index is not between -32768 and 32767.

TemplateControl​

Gets or sets a reference to the template that contains this control. (Inherited from Control)

public TemplateControl TemplateControl { get; set; }
Public Property TemplateControl As TemplateControl

Property Value​

TemplateControl

TemplateSourceDirectory​

Gets the virtual directory of the Page or UserControl that contains the current server control. (Inherited from Control)

public string TemplateSourceDirectory { get; }
Public Property TemplateSourceDirectory As String

Property Value​

String

Text​

Gets or sets the value used to generate the barcode.

public string Text { get; set; }
Public Property Text As String

Property Value​

String

TextAlign​

Gets or sets the alignment of text below the barcode when ShowText is enabled. This does not apply to UPC/EAN barcodes.

public Align TextAlign { get; set; }
Public Property TextAlign As Align

Property Value​

Align

TextColor​

Gets or sets the color of the text below the barcode when ShowText is enabled.

public Color TextColor { get; set; }
Public Property TextColor As Color

Property Value​

Color

TextFont​

Gets or sets the font used to display text when the ShowText property is true. This does not apply to the text of UPC/EAN barcodes.

public Font TextFont { get; set; }
Public Property TextFont As Font

Property Value​

Font

ToolTip​

Gets or sets the text displayed when the mouse pointer hovers over the Web server control. (Inherited from WebControl)

public string ToolTip { get; set; }
Public Property ToolTip As String

Property Value​

String

UniqueID​

Gets the unique, hierarchically qualified identifier for the server control. (Inherited from Control)

public string UniqueID { get; }
Public Property UniqueID As String

Property Value​

String

ValidateRequestMode​

Gets or sets a value that indicates whether the control checks client input from the browser for potentially dangerous values. (Inherited from Control)

public ValidateRequestMode ValidateRequestMode { get; set; }
Public Property ValidateRequestMode As ValidateRequestMode

Property Value​

ValidateRequestMode

ViewStateMode​

Gets or sets the view-state mode of this control. (Inherited from Control)

public ViewStateMode ViewStateMode { get; set; }
Public Property ViewStateMode As ViewStateMode

Property Value​

ViewStateMode

Exceptions​

An attempt was made to set this property to a value that is not in the ViewStateMode enumeration.

Visible​

Gets or sets a value that indicates whether a server control is rendered as UI on the page. (Inherited from Control)

public bool Visible { get; set; }
Public Property Visible As Boolean

Property Value​

Boolean

XDimension​

Gets or sets the minimum width of a narrow bar in the barcode in pixels (at 96dpi).

public Nullable&ltfloat> XDimension { get; set; }
Public Property XDimension As Nullable(Of Single)

Property Value​

Nullable&ltfloat>

Methods​

ApplyStyle(Style)​

Copies any nonblank elements of the specified style to the Web control, overwriting any existing style elements of the control. This method is primarily used by control developers. (Inherited from WebControl)

public void ApplyStyle(Style s)
Sub ApplyStyle(s As Style)

Parameters​

A Style that represents the style to be copied.

ApplyStyleSheetSkin(Page)​

Applies the style properties defined in the page style sheet to the control. (Inherited from Control)

public void ApplyStyleSheetSkin(Page page)
Sub ApplyStyleSheetSkin(page As Page)

Parameters​

The Page containing the control.

Exceptions​

The style sheet is already applied.

CopyBaseAttributes(WebControl)​

Copies the properties not encapsulated by the Style object from the specified Web server control to the Web server control that this method is called from. This method is used primarily by control developers. (Inherited from WebControl)

public void CopyBaseAttributes(WebControl controlSrc)
Sub CopyBaseAttributes(controlSrc As WebControl)

Parameters​

A WebControl that represents the source control with properties to be copied to the Web server control that this method is called from.

Exceptions​

is .

DataBind()​

Binds a data source to the invoked server control and all its child controls. (Inherited from Control)

public void DataBind()
Sub DataBind()

Dispose()​

Enables a server control to perform final clean up before it is released from memory. (Inherited from Control)

public void Dispose()
Sub Dispose()

Equals(Object)​

Determines whether the specified Object is equal to the current Object . (Inherited from Object)

public bool Equals(Object obj)
Function Equals(obj As Object) As Boolean

Parameters​

The Object to compare with the current Object .

Returns​

true if the specified Object is equal to the current Object ; otherwise, false.

FindControl(String)​

Searches the current naming container for a server control with the specified parameter. (Inherited from Control)

public Control FindControl(string id)
Function FindControl(id As String) As Control

Parameters​

The identifier for the control to be found.

Returns​

The specified control, or if the specified control does not exist.

Focus()​

Sets input focus to a control. (Inherited from Control)

public void Focus()
Sub Focus()

GetBarcode()​

Gets new instance of the barcode based on the type specified.

public Barcode GetBarcode()
Function GetBarcode() As Barcode

Returns​

GetHashCode()​

Serves as a hash function for a particular type. (Inherited from Object)

public int GetHashCode()
Function GetHashCode() As Integer

Returns​

A hash code for the current Object .

GetRouteUrl(Object)​

Gets the URL that corresponds to a set of route parameters. (Inherited from Control)

public string GetRouteUrl(Object routeParameters)
Function GetRouteUrl(routeParameters As Object) As String

Parameters​

The route parameters.

Returns​

The URL that corresponds to the specified route parameters.

GetRouteUrl(RouteValueDictionary)​

Gets the URL that corresponds to a set of route parameters. (Inherited from Control)

public string GetRouteUrl(RouteValueDictionary routeParameters)
Function GetRouteUrl(routeParameters As RouteValueDictionary) As String

Parameters​

The route parameters.

Returns​

The URL that corresponds to the specified route parameters.

GetRouteUrl(String, Object)​

Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control)

public string GetRouteUrl(string routeName, Object routeParameters)
Function GetRouteUrl(routeName As String, routeParameters As Object) As String

Parameters​

The name of the route.

The route parameters.

Returns​

The URL that corresponds to the specified route parameters and route name.

GetRouteUrl(String, RouteValueDictionary)​

Gets the URL that corresponds to a set of route parameters and a route name. (Inherited from Control)

public string GetRouteUrl(string routeName, RouteValueDictionary routeParameters)
Function GetRouteUrl(routeName As String, routeParameters As RouteValueDictionary) As String

Parameters​

The name of the route.

The route parameters.

Returns​

The URL that corresponds to the specified route parameters and route name.

GetType()​

Gets the Type of the current instance. (Inherited from Object)

public Type GetType()
Function GetType() As Type

Returns​

The Type instance that represents the exact runtime type of the current instance.

GetUniqueIDRelativeTo(Control)​

Returns the prefixed portion of the UniqueID property of the specified control. (Inherited from Control)

public string GetUniqueIDRelativeTo(Control control)
Function GetUniqueIDRelativeTo(control As Control) As String

Parameters​

A control that is within a naming container.

Returns​

The prefixed portion of the UniqueID property of the specified control.

Exceptions​

The NamingContainer property of is .

is .

HasControls()​

Determines if the server control contains any child controls. (Inherited from Control)

public bool HasControls()
Function HasControls() As Boolean

Returns​

if the control contains other controls; otherwise, .

MergeStyle(Style)​

Copies any nonblank elements of the specified style to the Web control, but will not overwrite any existing style elements of the control. This method is used primarily by control developers. (Inherited from WebControl)

public void MergeStyle(Style s)
Sub MergeStyle(s As Style)

Parameters​

A Style that represents the style to be copied.

RenderBeginTag(HtmlTextWriter)​

Renders the HTML opening tag of the control to the specified writer. This method is used primarily by control developers. (Inherited from WebControl)

public void RenderBeginTag(HtmlTextWriter writer)
Sub RenderBeginTag(writer As HtmlTextWriter)

Parameters​

A HtmlTextWriter that represents the output stream to render HTML content on the client.

RenderControl(HtmlTextWriter)​

Outputs server control content to a provided HtmlTextWriter object and stores tracing information about the control if tracing is enabled. (Inherited from Control)

public void RenderControl(HtmlTextWriter writer)
Sub RenderControl(writer As HtmlTextWriter)

Parameters​

The HtmlTextWriter object that receives the control content.

RenderEndTag(HtmlTextWriter)​

Renders the HTML closing tag of the control into the specified writer. This method is used primarily by control developers. (Inherited from WebControl)

public void RenderEndTag(HtmlTextWriter writer)
Sub RenderEndTag(writer As HtmlTextWriter)

Parameters​

A HtmlTextWriter that represents the output stream to render HTML content on the client.

ResolveClientUrl(String)​

Gets a URL that can be used by the browser. (Inherited from Control)

public string ResolveClientUrl(string relativeUrl)
Function ResolveClientUrl(relativeUrl As String) As String

Parameters​

A URL relative to the current page.

Returns​

A fully qualified URL to the specified resource suitable for use on the browser.

Exceptions​

is .

ResolveUrl(String)​

Converts a URL into one that is usable on the requesting client. (Inherited from Control)

public string ResolveUrl(string relativeUrl)
Function ResolveUrl(relativeUrl As String) As String

Parameters​

The URL associated with the TemplateSourceDirectory property.

Returns​

The converted URL.

Exceptions​

Occurs if the parameter contains .

SetRenderMethodDelegate(RenderMethod)​

Assigns an event handler delegate to render the server control and its content into its parent control. (Inherited from Control)

public void SetRenderMethodDelegate(RenderMethod renderMethod)
Sub SetRenderMethodDelegate(renderMethod As RenderMethod)

Parameters​

The information necessary to pass to the delegate so that it can render the server control.

ToString()​

Returns a String that represents the current Object . (Inherited from Object)

public string ToString()
Function ToString() As String

Returns​

A String that represents the current Object .

Events​

BarcodeExceptionRaised​

Occurs when there is an error in rendering the barcode.

public event BarcodeExceptionRaisedEventHandler LinearBarcode.BarcodeExceptionRaised;
Public Event LinearBarcode.BarcodeExceptionRaised As BarcodeExceptionRaisedEventHandler

Event Handler​

BarcodeExceptionRaisedEventHandler

DataBinding​

Occurs when the server control binds to a data source. (Inherited from Control)

public event EventHandler LinearBarcode.DataBinding;
Public Event LinearBarcode.DataBinding As EventHandler

Event Handler​

EventHandler

Disposed​

Occurs when a server control is released from memory, which is the last stage of the server control lifecycle when an ASP.NET page is requested. (Inherited from Control)

public event EventHandler LinearBarcode.Disposed;
Public Event LinearBarcode.Disposed As EventHandler

Event Handler​

EventHandler

Init​

Occurs when the server control is initialized, which is the first step in its lifecycle. (Inherited from Control)

public event EventHandler LinearBarcode.Init;
Public Event LinearBarcode.Init As EventHandler

Event Handler​

EventHandler

Load​

Occurs when the server control is loaded into the Page object. (Inherited from Control)

public event EventHandler LinearBarcode.Load;
Public Event LinearBarcode.Load As EventHandler

Event Handler​

EventHandler

PreRender​

Occurs after the Control object is loaded but prior to rendering. (Inherited from Control)

public event EventHandler LinearBarcode.PreRender;
Public Event LinearBarcode.PreRender As EventHandler

Event Handler​

EventHandler

Unload​

Occurs when the server control is unloaded from memory. (Inherited from Control)

public event EventHandler LinearBarcode.Unload;
Public Event LinearBarcode.Unload As EventHandler

Event Handler​

EventHandler

See Also​

ceTe.DynamicBarcode.Creator.Web