---
title: "Ajax Toolkit NumericUpDownExtender Control in ASP.Net"  
description: "Ajax Toolkit NumericUpDownExtender Control in ASP.NetThat is the NumericUpDownExtender which automatically adds two buttons to a text box: One for i"  
author: "Anonymous User"  
published: 2010-12-02  
updated: 2020-07-11  
canonical: https://www.mindstick.com/articles/274/ajax-toolkit-numericupdownextender-control-in-asp-dot-net  
category: "ajax"  
tags: ["ajax"]  
reading_time: 2 minutes  

---

# Ajax Toolkit NumericUpDownExtender Control in ASP.Net

### Ajax Toolkit NumericUpDownExtender Control in ASP.Net

That is the NumericUpDownExtender which automatically adds two buttons to a text box: One for increasing its value, one for decreasing it.

#### NumericUpDown Properties:

**TargetControlID**- The ID of the TextBox to modify

**Width** - Combined size of the TextBox and Up/Down buttons. This property is not used if you provide custom buttons.

**RefValues** - A list of strings separated by semicolons (;) to be used as an enumeration by NumericUpDown Extender

### Code:

**Add these control on aspx page**

```
<asp:ScriptManager ID="ScriptManager1"
runat="server"></asp:ScriptManager><%--Add the NumericUpDown
Extender --%><cc1:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server" TargetControlID="TextBox1"Width="200" RefValues="Red;Blue;Green;Brown"></cc1:NumericUpDownExtender> <asp:Label ID="Label1" runat="server" Text="Change this text color." Font-Bold="true"Font-Size="Large" Font-Names="Arial"></asp:Label><br/><br/><br /><asp:TextBox ID="TextBox1" runat="server" Font-Bold="true" ForeColor="Blue" BackColor="Azure"></asp:TextBox><asp:Button ID="Button1" runat="server" Text="Change Label" Font-Bold="true" OnClick="Button1_Click"Height="30" /> Here TargetControlIDis "TextBox1" in whichUpDownExtender
will be applyWrite these codes on Button1 click eventprotected void Button1_Click(object sender, EventArgs e)    {        Label1.ForeColor = System.Drawing.Color.FromName(TextBox1.Text);       }
```

The FromName property will get the color name from TextBox1. TextBox1 Gets the value from RefValues.

##### Run The Project

![Ajax Toolkit NumericUpDownExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/5c2fef23-3dad-4a51-8196-8499ca23dcb8/images/2432151f-5bb4-4686-b9d6-4368088db8c9.png)

##### When you click up or down button then Next Value will show in the TextBox

##### \
![Ajax Toolkit NumericUpDownExtender Control in ASP.Net](https://www.mindstick.com/mindstickarticle/5c2fef23-3dad-4a51-8196-8499ca23dcb8/images/97df2877-3744-4f2f-896a-3c0d96dda8de.png)

When you click Change Color Button then Label Text color will be changed into the selected color.

You should also read this Article :- [**String Split in C#**](https://www.mindstick.com/Articles/1527/string-split-in-c-sharp)

---

Original Source: https://www.mindstick.com/articles/274/ajax-toolkit-numericupdownextender-control-in-asp-dot-net

Copyright © MindStick Software Pvt. Ltd. This Markdown version is provided for developers, AI systems, and offline reading.
