Pass-Through Attributes

Go to:

Tools, Properties..., Attributes tab

Attributes are component properties whose values are assigned in the Properties dialog.  Normally, attributes are properties like “DisplayStyle”, “URL”, etc.  Many of these properties govern how Iron Speed Designer generates specific components.  Others are ASP.NET component properties that are ignored by Iron Speed Designer and are passed through and inserted as part of the generated ASP.NET components.

Pass-through attributes on the Attributes tab in the Properties dialog.

Nearly every component has a few pass-through attributes and you can set them on the Attributes tab in the Properties dialog.  For example, many settings in the Properties dialog have corresponding pass-through attributes.  The name of a pass-through attribute needs to be unique in the pass-through attribute collection.  Pass-through attributes and their values are physically stored in your application’s properties files as part of the XML schema for the specific component.

Pass-through attribute definitions

The terms Property and Attribute are used extensively in the .NET documentation, but are not clearly defined in an easy to find place.  Here are the definitions:

A server control's Properties are the things listed as Properties in the .NET documentation for the control class.  Properties can be set declaratively in the server control's tag by specifying an attribute name/value pair within the control's start tag.  Any attribute name / value pair within the control's start tag with a name that doesn't match one of the control's properties is an Attribute, and is "passed through" into the control's Attributes collection.  Most controls render their Attributes inside the HTML tag rendered by the control.

For example, Button controls have a CausesValidation property, but not an OnClick property.  However, either "CausesValidation=True" or "OnClick='javascript:...'" will cause the button to render an HTML tag with an OnClick attribute.  (Note that in the previous example, setting both CausesValidation=True and OnClick will cause a conflict.)  Also note that certain controls, like Literal, do not allow Attributes; they only allow Properties.

Setting ASP.NET control properties using pass-through attributes

Every code generation tag (except GEN:Text) is replaced during generation with one or more ASP.NET server control tags.  For example, GEN:FieldValue is replaced by different ASP.NET controls depending on the control type.  Every type of ASP.NET server control supports a different set of run-time properties.  Most, but not all, of these property can be initialized using pass-through attributes.  The list of valid pass-through attributes is determined by the server control class and its super classes and interfaces.  These ASP.NET control properties are described in the .NET documentation for each control class.  Also, the valid values for each property can depend on the control type, the property, and in some cases the values of other properties for that control instance.

Some code generation tags also generate additional ASP.NET controls.  For example, GEN:FieldValue generates zero to five validator control tags in addition to the primary control, depending on the code generation tag's properties.  Each of these non-primary tags also supports a set of run-time properties as described above.  These can also be set using pass-through attributes, but the pass-through Name must be prefixed with the generated ID of the secondary tag in order to alert Iron Speed Designer that the pass-through attribute is for a non-primary tag rather than the primary tag.

Custom pass-through attributes

You can create your own “pass-through” attributes and set them directly in the Properties dialog.  Pass-through attributes are not limited to just those used in controls generated by Iron Speed Designer.

See also

Pass-Through Attribute Behavior at Run-Time

Overriding Pass-Through Attributes

Setting Initial Values with Pass-Through Attributes

Examples of Pass-Through Attributes

Pass-Through Attributes for Individual Code Generation Tags

Button Tag Pass-Through Attributes

FieldFilter Pass-Through Attributes

FieldLabel Pass-Through Attributes

FieldStatistic Pass-Through Attributes

FieldValue Pass-Through Attributes

HTML Pass-Through Attributes

Hyperlink Pass-Through Attributes

Image Pass-Through Attributes

Label Pass-Through Attributes

Literal Pass-Through Attributes

Record Pass-Through Attributes

SearchFilter Pass-Through Attributes

TabContainer Pass-Through Attributes

TabPanel Pass-Through Attributes

Table Pass-Through Attributes

TableStatistic Pass-Through Attributes

Text Pass-Through Attributes

Use Pass-Through Attributes