C# Class EnterpriseWebLibrary.EnterpriseWebFramework.Controls.EwfTextBox

A text box automatically placed in a wrapper so that it is styled consistently across all browsers. If the width is set in pixels, this control automatically adjusts it, subtracting 6, to make the final resultant width be the given value. Widths less than 6 pixels are not supported.
Inheritance: System.Web.UI.WebControls.WebControl, ControlTreeDataLoader, FormControl, ControlWithJsInitLogic, ControlWithCustomFocusLogic
Datei anzeigen Open project: enduracode/enterprise-web-library Class Usage Examples

Private Properties

Property Type Description
AddTextareaValue void
ControlTreeDataLoader void
ControlWithCustomFocusLogic void
ControlWithJsInitLogic string

Public Methods

Method Description
AddJavaScriptEventScript ( string jsEventConstant, string script ) : void

Allows for adding custom JavaScript event scripts to the text box.

EwfTextBox ( string value, int rows = 1, bool masksCharacters = false, int maxLength = null, bool readOnly = false, bool disableBrowserAutoComplete = false, bool suggestSpellCheck = null, PostBack postBack = null, bool autoPostBack = false ) : System

Creates a text box.

GetPostBackValue ( PostBackValueDictionary postBackValues ) : string

Gets the post back value.

SetWatermarkText ( string text ) : void

The given text will be shown by default and will vanish when the text box gains focus. If focus is lost again, the text will reappear. This method has no effect if the text box has a non empty value. Do not pass null for text.

SetupAutoComplete ( ResourceInfo service, AutoCompleteOption option ) : void

Sets this text box up for AJAX auto-complete.

ValueChangedOnPostBack ( PostBackValueDictionary postBackValues ) : bool

Returns true if the value changed on this post back.

Protected Methods

Method Description
Render ( System.Web.UI.HtmlTextWriter writer ) : void

Renders this control after applying the appropriate CSS classes.

Private Methods

Method Description
AddTextareaValue ( Control textarea, string value ) : void
ControlTreeDataLoader ( ) : void
ControlWithCustomFocusLogic ( ) : void
ControlWithJsInitLogic ( ) : string

Method Details

AddJavaScriptEventScript() public method

Allows for adding custom JavaScript event scripts to the text box.
public AddJavaScriptEventScript ( string jsEventConstant, string script ) : void
jsEventConstant string
script string
return void

EwfTextBox() public method

Creates a text box.
public EwfTextBox ( string value, int rows = 1, bool masksCharacters = false, int maxLength = null, bool readOnly = false, bool disableBrowserAutoComplete = false, bool suggestSpellCheck = null, PostBack postBack = null, bool autoPostBack = false ) : System
value string Do not pass null.
rows int The number of rows in the text box.
masksCharacters bool Pass true to mask characters entered in the text box. Has no effect when there is more than one row in the text box. ///
maxLength int The maximum number of characters that can be entered in this text box.
readOnly bool Pass true to prevent the contents of the text box from being changed.
disableBrowserAutoComplete bool If true, prevents the browser from displaying values the user previously entered. Keep in mind that there is /// currently an "arms race" taking place over forms auto-complete. Banks and other "high-security" organizations keep looking for ways to disable /// auto-complete on their login forms while browsers and password managers are always trying to preserve this functionality for their users. Because of /// this war, it's possible that your request to disable auto-complete will be ignored. See http://stackoverflow.com/a/23234498/35349 for more information. ///
suggestSpellCheck bool By default, Firefox does not spell check single-line text boxes. By default, Firefox does spell check multi-line text /// boxes. Setting this parameter to a value will set the spellcheck attribute on the text box to enable/disable spell checking, if the user agent supports /// it.
postBack PostBack The post-back that will be performed when the user hits Enter on the text box or selects an auto-complete item.
autoPostBack bool Pass true to cause an automatic post-back when the text box loses focus.
return System

GetPostBackValue() public method

Gets the post back value.
public GetPostBackValue ( PostBackValueDictionary postBackValues ) : string
postBackValues PostBackValueDictionary
return string

Render() protected method

Renders this control after applying the appropriate CSS classes.
protected Render ( System.Web.UI.HtmlTextWriter writer ) : void
writer System.Web.UI.HtmlTextWriter
return void

SetWatermarkText() public method

The given text will be shown by default and will vanish when the text box gains focus. If focus is lost again, the text will reappear. This method has no effect if the text box has a non empty value. Do not pass null for text.
public SetWatermarkText ( string text ) : void
text string
return void

SetupAutoComplete() public method

Sets this text box up for AJAX auto-complete.
public SetupAutoComplete ( ResourceInfo service, AutoCompleteOption option ) : void
service ResourceInfo
option AutoCompleteOption
return void

ValueChangedOnPostBack() public method

Returns true if the value changed on this post back.
public ValueChangedOnPostBack ( PostBackValueDictionary postBackValues ) : bool
postBackValues PostBackValueDictionary
return bool