Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 616607
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 13, 20262026-05-13T18:20:42+00:00 2026-05-13T18:20:42+00:00

Suppose I have an DevExpress ASPxTextBox whose id is instrument. I want to access

  • 0

Suppose I have an DevExpress ASPxTextBox whose id is “instrument”. I want to access the value of the text box at client side. So I need to write a javascript.

If it was a normal asp text box, I could have accessed the text box by writing code like

var instrumentElement = document.getElementById('<%=instrument.ClientID%>')

But the same approach is not working for the DevExpress’s Text Box.

How can I access an ASPxTextBox ? I am using Developer Express Version 7.2.

Here is some more thorough code snippet –

<div style="display: inline; float: left;">
    <dxe:ASPxTextBox ID="InstrumentQuantity" runat="server" Width="170px">
    </dxe:ASPxTextBox>
</div>

<div style="display: inline; float: left;" onclick="incOrDecQty(0);">
    <asp:ImageButton ID="decrementQuantity" runat="server" 
            Height="16px" Width="16px" ImageUrl="~/images/left.png" 
            AlternateText="Decrease Quantity" PostBackUrl="javascript:void(0);"/>
</div>

<div onclick="incOrDecQty(1);">
    <asp:ImageButton ID="incrementQuantity" runat="server" 
            AlternateText="Increase Quantity" ImageUrl="~/images/right.png" 
            Height="16px" Width="16px" PostBackUrl="javascript:void(0);" />
</div>

That was the ASP Code. The corresponding Javascript is as follows :

function incOrDecQty()
{
    var element = document.getElementById('<%=InstrumentQuantity.ClientID%>');
    var lotSize = parseInt(document.getElementById('<%=LotSize.ClientID%>')
        .innerHTML, 10);
    var currentValue = parseInt(element.value,10);

    if(arguments[0] == 1)
        currentValue += lotSize;
    else if((currentValue - lotSize) >= 0 )
        currentValue -= lotSize;

    element.value= currentValue;            
}
  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-13T18:20:42+00:00Added an answer on May 13, 2026 at 6:20 pm

    You can set the ClientInstanceName property on the AspxTextBox.

    <dxe:ASPxTextBox ID="InstrumentQuantity" 
     runat="server" Width="170px" 
     ClientInstanceName="MyTextBox"> 
    </dxe:ASPxTextBox> 
    

    ClientSide:

    function DoSomething()
    {
        var theText = MyTextBox.GetValue(); //GetValue() is the DevExpress clientside function
    
        MyTextBox.SetValue('this is the value i want to use'); //Sets the text
    
    }
    

    The devexpress documentation has some pretty good info on their client side scripts. Go to this link, click on Reference, then click on DevExpress.Web.ASPxEditors.Scripts on the menu.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Suppose I have a text file with this content: abcdefghk I want to write
Suppose I have two h:inputText components. I want to bind both of the text
Suppose I have a 400K text file which I want to read from a
Suppose I have arbitrary text with a currency value in it, like this: The
Suppose I have this : item_one = Object.find(1) rescue item_one, value = [Object.first, true]
Suppose I have 3 language: en , tc , sc , I want to
Suppose I have a class MyClass to which I want to add certain 'observer'
Suppose you have an array value => timestamp. The values are increasing with the
Suppose I have a bunch of static fields and I want to use them
Suppose I have a module with the methods : function1,function2,function3. I want to import

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.