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 6007829
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 23, 20262026-05-23T01:44:18+00:00 2026-05-23T01:44:18+00:00

I am working in asp.net and have a text box txtRateOfPay and a dropdown

  • 0

I am working in asp.net and have a text box txtRateOfPay and a dropdown list ddlPayInterval. There is a label on which yearly salary will be calculated lblSalary. Dropdown can contain values: Hour, Week, Month, Year, Pay Period. And when I write 1 in txtRateOfPay, lblSalary must get updated as 2080 if I selected Hour from ddl.

Formula is: If Hour is selected from ddl, then one week will have 40 hours and one year will have 52 weeks so the yearly salary is 2080.

Can anyone tell me how can I achieve this using javascript/jQuery?
I want that label to be updated when user is entering data in textbox, NOT on blur of textbox or ddl.

Thanks in advance.

  • 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-23T01:44:18+00:00Added an answer on May 23, 2026 at 1:44 am

    You can use onkeypress event for textbox and onchange event for Dropdownlist

    <asp:TextBox runat="server" ID="txtID" onkeypress="javascript:JSFunctionName();"></asp:TextBox> 
    
    <asp:DropDownList runat="server" ID="ddlID" onchange="javascript:JSFunctionName();">    </asp:DropDown>
    
    
            <script type="text/javascript">
                function JSFunctionName() {
                    document.getElementById('<%=lblID.ClientID %>').innerHTML = document.getElementById('<%=txtID.ClientID %>').value * document.getElementById('<%=ddlID.ClientID %>').value;
                }
            </script>
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I'm working in ASP.NET and have a text box in which I enter First
I'm working on an ASP.NET/C# app. I have 2 text boxes and I need
i am using asp.net c# jquery vs 2008 I have two check box list
i have a dropdown list and text box. i disabled both controls using code
I have a ASP.Net web form that contains both text box fields and hidden
I have a ASP.NET textbox autocomplete with JQuery, is working perfectly, i type part
I am working on asp.net application and I have generated entity model (edmx) from
I am working on asp.net application and I have an update panel like this:
Hi I have been working on asp.net for a while. I am wondering if
I am working on ASP.Net 2.0 website and I have a strange problem. First

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.