ASP.NET Control Properties

Accessibility properties (ASP.NET)

Property

Description

TabIndex

Specifies the numeric sequence order for tabbing between fields.  ‘1’ is the first field displayed, ‘2’ is the second, and so on.  You can set any numeric number you wish to assign to the TabIndex property for any control.  In this way, you can define the TabIndex property for all fields in a record control or table control.

Applies To

Text Box
Dropdown List
List Box
Radio Button List
Button

 

Appearance Properties (ASP.NET)

The ASP.NET controls have a wide variety of properties that can be used to govern the controls’ behaviors.

Property

Description

 

Columns

Specifies the screen width of the text box, in characters, for text box controls.  This setting governs only the display width of the field, not the number of bytes that the underlying database field can accommodate.  Text box columns pertain primarily to string-based field validation types.

The number of characters displayed for the field can be set globally via the “Text box columns” setting in the Databases tab.  In this case, leave “Text box columns” setting blank in the field’s Property Sheet.

The maximum number of characters which can be entered into the text box control is governed by the “Text box columns” setting on the Databases tab (in HTML terms, its “maxlength” attribute).

Applies To

Text Box

 

CssClass

This property is created by the Application Wizard and not set directly.  It is generally set to “Filter_Input”.

Applies To

Text Box
Dropdown List
Listbox
Radio Button List
File Upload

 

ImageUrl

The URL of the image to be displayed.

  • Image URLs that are file names are assumed to reside in the same run-time directory as the page being bound.

  • Image URLs that are relative will be relative to their page's corresponding run-time directory, not the app's directory.

  • Fully qualified URLs must begin with http:// or https://.

  • URLs must not contain backslashes; please use forward slashes.

Example:

Binding an Image tag in MyApp\Shared\test.aspx to "image1.gif" will create an effective reference to MyApp\Shared\image1.gif.

Binding this same image to "../Images/image2.gif" will create an effective reference to MyApp\Images\image2.gif.

 

Rows

Specifies the screen height, in rows, for List box filters.

 

Text

The text to display.  The text may contain HTML tags, which will be passed through to the page and rendered in the application user’s browser.

Resource File Key

You can also dynamically fetch a text string from your application’s resource file (RESX) at application run-time by specifying a Resource Key.  This is useful in multi-language applications that have multiple resource files, one for each language.  This permits easy application localization by editing your application’s resource file instead of the application itself.  Specify the Resource Key in curly braces, e.g.:

            {Txt:MyTextString}

Default Label

You can either specify a text string directly or you can specify a variable of the form:

            %ISD_DEFAULT%<TABLE NAME>%<FIELD NAME>

Example:

            %ISD_DEFAULT%Products%ProductName

This variable specifies that the text label is the default label specified in the Databases tab for the ProductName field in the Products table.

Applies To

Text Box

 

Behavior Properties (ASP.NET)

Property

Description

AutoPostBack

True

Automatically post back to the server application when the selected value is changed.  For example, when changing the selected value in a dropdown list filter, the associated table control is automatically updated with the new filter value applied.

False

Do not post back to the server application when the selected value is changed.  This requires the user to click a button or link to initiate the postback, and is typically used in situations where application users must select multiple filter values before the associated table control data is updated.

The default behavior for dropdown filters created by Iron Speed Designer is to postback an event immediately when a new selection is made.  This sometimes becomes inconvenient when there are multiple filters and the end users would prefer to select from multiple filters first, and then press a Go button to begin the process of filtering.

If you have a “Go” button to start the filtering process (AutoPostBack = False), your application must instruct the table control to update itself when the user presses the Go button.  However, instead of notifying the table control, it’s better to notify the filter control(s) and let it (them) forward the message to the table control.  This ensures that the table control gets notified by the filter control rather than from the button control.

See Turning off AutoPostBack on filters for details.

Applies To

Dropdown list

CausesValidation

Specifies whether the data input on the page should be validated.

True

The data input on the page is validated when the button or link is clicked.

False

The data input on the page is not validated when the button or link is clicked.

 

Applies To

Image Button
Link Button
Push Button

EnableViewState

Indicates that View State is saved for the field.  Disabling the View State will improve run-time performance but no data will be retained when the application user moves from page to page.

True

View State saving is enabled.

False

View State saving is not enabled.

MaxLength

Specifies the maximum number of characters (maximum length) that can be entered in a single line text box control.  Note: MaxLength works only for single-line and password text boxes; it does not work when TextMode is ‘Multiline’.

Applies To

Text Box

Rows

Specifies the number of rows when multi-line text box is selected via the TextMode property.

Applies To

Text Box

TextMode

Specifies whether a password or multi-line text box control is created.

Password

Designates the field as a password field.  Asterisks are displayed instead of the text content of the field.

Multiline

The field is a multi-line field and permits multi-line input.

If you wish a single line text box to be displayed – the most common case – then omit the TextMode property.  The default is a single-line text box when the TextMode property is not set.

Password text mode

Iron Speed Designer automatically (1) sets the control’s Text Mode property to Password and (2) sets the field validation type to Password if Iron Speed Designer detects that the underlying database field type is of ‘password’ or has ‘password’ in the field name.  Note that the .NET control’s Text Mode property and the Iron Speed Designer field validation type are two separate properties that can be controlled independently in Iron Speed Designer.

When the Password text mode is enabled for the underlying .NET control, the text box will be blank even though there may be underlying data in the database.  Also, the control’s value cannot be pre-set.  (These are .NET text box control behaviors.)  If the application user does not enter a value into the text box, the data remains unchanged in the database when the record is saved.  If the application user enters a value into the text box, the new value is stored in the database when the record is saved, overwriting the previous value, if any.  (These are behaviors of your application.)

A problem can occur on Edit Record and Edit Table pages if your password field is required, as can arise if your underlying database field requires a value (i.e., is ‘not NULL’).  The ‘missing value’ error will be displayed if your user saves the record leaving the password field empty (unchanged), i.e., a new value is not entered into the blank password control).  To avoid this, set the displayed field control to ‘not required’ via the Property Sheet so the validation error message is not displayed if your application user leaves the password value unchanged.

To display the actual contents of a password field in the text box, such as on an Edit Record page, set the Text Mode to Single Line.  (Note: asterisks may be displayed if the field validation type is also set to Password.)

Applies To

Text Box

Visible

True

The field is visible (displayed).

False

The field is invisible (not displayed).

 

Applies To

Text Box

Layout properties (ASP.NET)

Property

Description

Height

The height of an image, if you wish to force a particular height.

Applies To

Image

RepeatColumns

Specifies the number of columns to display when a radio button list is selected.  The number of rows displayed depends on the number of values in the underlying data being displayed.  Use the RepeatColumns property in conjunction with the RepeatDirection.

Applies To

Radio Button List

RepeatDirection

Specifies the layout for a radio button list.  The number of rows and columns displayed depends on the number of values in the underlying data being displayed.

Vertical

Displays the number of rows specified by the RepeatColumns property.

Horizontal

Displays the number of columns specified by the RepeatColumns property.

 

Applies To

Radio Button List

RepeatLayout

Table

Formats a radio button list nicely, like in a table cell.

You can also use the cellpadding and cellspacing properties to increase or decrease the spacing between the radio button list columns.

Applies To

Dropdown List
List Box
Radio Button List

Width

Sets the width of the .NET control.

Image controls

Sets the width of an image, if you wish to force a particular width.

Applies To

Nearly all .NET controls, including:
Dropdown List
Image
Label
Literal
Text Box

 

Navigation Properties (ASP.NET)

Property

Description

NavigateURL

The destination URL displayed when the link is clicked.

Target

The name of the destination frame or browser, if a new browser is to be launched.  The string can be any string desired.  That is, an application can open a window and give it a specific name; if that name is specified as the Target Window, then the output of the hyperlink tag will appear in that window.

 

See Also

Code Generation Tags

Code Generation Tag Properties