Pass-Through Attributes

The pass-through attribute feature allows you to extend the attribute model of code generation tags.  Attributes are component properties whose values are assigned in the tag’s Properties dialog and sometimes directly in the properties file.  Normally, attributes are properties like “DisplayStyle”, “URL”, etc.

Pass-through attributes on the Properties tab in the tag’s Properties dialog.

When generating the Presentation Layer code, Iron Speed Designer passes the pass-through attribute and value pairs to the ASP attribute name and value.

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.

Custom Pass-Through Attributes

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

Pass-Through Attributes in Iron Speed Designer

Pass-through attributes are an escape mechanism for data-driven extensions, as opposed to code-driven extensions.  Any component can have pass-through attributes and you can set them on the Properties tab in the tag’s Properties dialog.  For example, many settings in the Page 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.  Iron Speed Designer stores the attributes in sorted order by attribute name in the properties file.

See also

Generating Applications with Pass-Through Attribute

Pass-Through Attribute Behavior at Run-Time

Overriding Pass-Through Attributes

Examples of Pass-Through Attributes

Setting Initial Values with Pass-Through Attributes

Pass-Through Attributes for Individual Code Generation Tags

Button Tag Pass-Through Attributes

CategoryFilter Pass-Through Attribute Properties

FieldFilter Pass-Through Attribute Properties

FieldLabel Pass-Through Attribute Properties

FieldStatistic Pass-Through Attribute Properties

FieldValue Pass-Through Attribute Properties

HTML Pass-Through Attribute Properties

Hyperlink Pass-Through Attribute Properties

Image Pass-Through Attribute Properties

Label Pass-Through Attribute Properties

Literal Pass-Through Attribute Properties

Pass-Through Attribute Properties

SearchFilter Pass-Through Attribute Properties

Table Pass-Through Attribute Properties

TableStatistic Pass-Through Attribute Properties

Text Pass-Through Attribute Properties

Use Pass-Through Attribute Properties