- Name Image
- CSS Class CC_Image
- Type Path: string, Tag: String
In its simplest guise an Image control allows you to show an IMG tag on the
page and control its src and alt/title text from code. However the Image
control also has a powerful array of extra features, unlocked via its
Zoom and Target properties.
You can, for example, use the Image control to create quick Javascript
onmouseover based rollovers, or even Javascript (and NoScript!) image
galleries without needing any codebehind.
Roadmap
- Breaking change : rename Link property to Href
- Also reconsider names of Path and Zoom properties
- Target is poorly overloaded and should work (switch excepted) for NoScript when not in a form
- Doesnt provide for javascript events but loath to allow raw attributes to be passed down from the ASPX like .Net does
| Qualifiers |
Type |
Name |
Default |
Description |
|
string |
id |
"" |
Unique identifier within the page for the control |
|
string |
Class |
"" |
CSS class to assign to the control alongside the internal Chan classes. |
|
bool |
Visible |
true |
Wether or not the control is rendered into the page's HTML. |
|
bool |
NoScript |
false |
Wether or not the control generates javascript, the Target functionality aside from "Switch" is preserved via postbacks, so long as the Image is within a Form. |
|
int |
Width |
-1 |
Display width of the image in pixels, directly mapped to the IMG tag WIDTH attribute. When set to -1 this property is ignored. |
|
int |
Height |
-1 |
Display height of the image in pixels, directly mapped to the IMG tag HEIGHT attribute. When set to -1 this property is ignored. |
|
string |
Path |
"" |
The virtual path to the image to display, if left blank an IMG tag will be rendered containing a transparent gif. |
|
string |
Zoom |
"" |
The virtual path to an alternative image, used in conjunction with Target. |
|
string |
Target |
"" |
Either the ID of another Image control in which to show the Zoom image when this one is clicked on (NoScript Requires the Image control to be within a Form), or "switch" which will swap Zoom with Path during mouse rollover. |
|
string |
Link |
"" |
If not empty then the Image will automatically be enclosed in an A tag to make it a link, ignored if Target is an image control but works with Target="switch". If this starts with "^" then the link opens in a new window. |
|
string |
Text |
"" |
The text property is used to populate the IMG tag ALT and TITLE attributes. |
|
string |
Tag |
"" |
The Tag is an extra piece of string data to accompany the image, you might, for example, use this in conjunction with the Remember property to store an internal ImageID when constructing some kind of image selector form. |
|
bool |
Remember |
"" |
When true the Image control will remember its own Path and Tag properties across postbacks, useful if either of these is able to be changed by the user. (Requires the Image control to be within a Form) |