SuperButton Object's Properties

<%@ Register TagPrefix="osb" Namespace="OboutInc.OboutSuperButton" Assembly="obout_SuperButton" %>


Properties
propertyId Component Id. Optional
propertyCommentHeader Bool. If this property is set to true, comment header for the control will be generated.
If it is set to false, this control will be "tightly" placed after previous control.
Optional, default: "true".

oBut.CommentHeader = false
propertyCanBeFocused Bool. If this property is set to true, the button can be focused.
'ENTER' key press on focused button causes 'Click' effect.
Optional, default: "false".

oBut.CanBeFocused = true

See also DefaultButton of HtmlForm working example.
propertyCausesValidation Bool. Indicates whether clicking the control causes page validation to occur.
This property has an effect only when isSubmit property is set to true.
Optional, default: "false".

oBut.CausesValidation = true

See also ASP.NET validation working example.
propertyValidationGroup String. Name for the group of validation controls for which the button control causes validation when it posts back to the server.
This property has an effect only when the value of the CausesValidation property is set to true and isSubmit property is set to true.
Optional, default: empty string ("").

oBut.ValidationGroup = "Validators_Group_1"

See also ASP.NET validation working example.
propertyCommandName String. Command name that is propagated to the Command event.
This property has an effect only when isSubmit property is set to true.
Optional, default: empty string ("").

oBut.CommandName = "Sort"

See also Command buttons working example.
propertyCommandArgument String. Optional argument that is propagated to the Command event.
This property has an effect only when isSubmit property is set to true.
Optional, default: empty string ("").

oBut.CommandArgument = "Descending"

See also Command buttons working example.
propertyPostBackUrl String. URL of the Web page to post to from the current page when the control is clicked.
This property has an effect only when isSubmit property is set to true.
Optional, default: empty string ("").

oBut.PostBackUrl = "Target_Page.aspx"

See also Cross-page posting working example.
propertyWidth String. Width of the button. Optional
By default button's width depends on its content.

oBut.Width = "100%"
propertyHeight String. Height of the button. Optional
By default button's height depends on its content.

oBut.Height = "30px"
propertyText String. Text that appears inside the button. Optional

oBut.Text = "Check"
propertyRightText Bool. Indicates text position relative to image when both text and image are used for the button.
Optional, default: "true".

oBut.RightText = false

See also Text position inside button working example.
propertyTitle String. Title of the button. Optional

oBut.Title = "Save the content"
propertyGroupName String. Name of buttons group. Optional, by default a button doesn't belong to any group

oBut.GroupName = "toolBar"
propertySkinStyle String. The name of button's style ("normal", "pressEffected", "classic", "xp" etc.).
Optional, default: "normal"

oBut.SkinStyle = "smooth"
propertySkinFolder String. Path to directory with skin CSS files. Optional, default: "osbSkins".
If no default, should be set for the first SuperButton object

oBut.SkinFolder = "."
propertyImageNormal String. File name of image inside the button, when the button is enabled. Optional

oBut.ImageNormal = "printer_n.gif"
propertyImageHover String. File name of image inside the button, when the button is hovered. When not specified, ImageNormal is used. Optional

oBut.ImageHover = "printer_h.gif"
propertyImagePressed String. File name of image inside the button, when the button is pressed. When not specified, ImageNormal is used. Optional

oBut.ImagePressed = "printer_p.gif"
propertyImageActive String. File name of image inside the button, when the button is set as active. When not specified, ImageNormal is used. Optional

oBut.ImageActive = "printer_a.gif"
propertyImageDisabled String. File name of image inside the button, when the button is disabled. When not specified, ImageNormal is used. Optional

oBut.ImageDisabled = "printer_d.gif"
propertyImageHeight New String. Height of image inside the button. Optional

oBut.ImageHeight = "20px"
propertyImageWidth New String. Width of image inside the button. Optional

oBut.ImageWidth = "30px"
propertyImageFolder String. Path to directory with images. Optional, default: "osbImages".
If no default, should be set for the first SuperButton object

oBut.ImageFolder = "./images"
propertymouseClick String. JavaScript code executing on button click. Optional

oBut.mouseClick = "alert('button is clicked');"
propertyonActive String. JavaScript code executing when the button is set as active. Optional

oBut.onActive = "but_01.disable();"
propertyonUnActive String. JavaScript code executing when the button is unset as active. Optional

oBut.onUnActive = "but_01.enable();"
propertyisSubmit Bool. Indicates that the button click forces submit of corresponding Form.
Optional, default: "false".

oBut.isSubmit = true
propertyValidate String. JavaScript code executing before Form submitting after this button was clicked (when isSubmit = true). The Form will be submitted if this code returns true only. Optional

oBut.Validate = "return myValidate();"

See also .NET Validation working example.
propertyDisabled Bool. Indicates that the button is initialy disabled.
Optional, default: "false".

oBut.Disabled = true
propertyActivated Bool. Indicates that the button is initialy activated.
Optional, default: "false".

oBut.Activated = true
propertyScriptFolder String. Path to directory with JavaScript file. Optional, by default - current directory.
If no default, should be set for the first SuperButton object

oBut.ScriptFolder = "."
propertyPathPrefix String. Path prefix for ImageFolder , SkinFolder and ScriptFolder directories. Default empty. Optional

oBut.PathPrefix = "../"


If Text property is specified and ImageNormal- not, the button will be text type.
If ImageNormal property is specified and Text- not, the button will be image type.
Both Text and ImageNormal properties can be specified for a button, in this case the button will be mixed type (contain both image and text).



Events
propertyClick System.EventHandler delegate.
This event is raised when SuperButton is clicked. isSubmit property should be set to true.

C# code sample.

using System;
...
oBut.Click +=new EventHandler(oBut_OnClick);
...
private void oBut_OnClick(object sender, EventArgs e)
{
   ...
}


See also working example.
propertyCommand New System.Web.UI.WebControls.CommandEventHandler delegate.
This event is raised when SuperButton is clicked. isSubmit property should be set to true.

C# code sample.

using System.Web.UI.WebControls;
...
oBut.Command +=new CommandEventHandler(oBut_OnCommand);
...
private void oBut_OnCommand(object sender, CommandEventArgs e)
{
   string command = e.CommandName;
   string argument = (String)e.CommandArgument;
   ...
}


See also working example.


Sample ASP.NET
<osb:SuperButton Id="but1" runat="server" Text="button 1" SkinStyle="classic"
   mouseClick="alert('button1 clicked')" />