Back to Devexpress

ASPxClientTextBox Class

aspnet-js-aspxclienttextbox.md

latest2.0 KB
Original Source

ASPxClientTextBox Class

A client-side equivalent of the ASPxTextBox control.

Declaration

ts
declare class ASPxClientTextBox extends ASPxClientTextBoxBase

Remarks

The ASPxClientTextBox object serves as a client-side equivalent of the ASPxTextBox class.

Use the ClientInstanceName property to programmatically access the client object rendered for the ASPxTextBox control in client-side script.

Example

In this example, click the ASPxHyperLink to set the text box value to the hyperlink’s text using the client SetValue(value) method.

aspx
<dxe:ASPxTextBox ID="tbText" runat="server" Width="170px">
     <ClientSideEvents TextChanged="OnTextChanged" KeyPress="OnKeyPressed" />
</dxe:ASPxTextBox>
<dxe:ASPxHyperLink ID="lnkSample1" runat="server" Text="Text #1" Cursor="pointer">
     <BorderBottom BorderStyle="Dashed" BorderWidth="1px" />
     <ClientSideEvents Click="OnHyperLinkClick" />
</dxe:ASPxHyperLink>
js
function OnHyperLinkClick(s, e) {
    var sampleText = s.GetText();
    tbText.SetValue(sampleText);
    ...
}

Inheritance

ASPxClientControlBase ASPxClientControl ASPxClientEditBase ASPxClientEdit ASPxClientTextEdit ASPxClientTextBoxBase ASPxClientTextBox

See Also

Text Box

ASPxClientTextBox Members