- ASP.NET 4.5
- Getting Started with EF
- 1. Entity Framework 4.0 and ASP.NET – Getting Started Part 1
- 2. Entity Framework 4.0 and ASP.NET – Getting Started Part 2
- 3. Entity Framework 4.0 and ASP.NET – Getting Started Part 3
- 4. Entity Framework 4.0 and ASP.NET – Getting Started Part 4
- 5. Entity Framework 4.0 and ASP.NET – Getting Started Part 5
- 6. Entity Framework 4.0 and ASP.NET – Getting Started Part 6
- 7. Entity Framework 4.0 and ASP.NET – Getting Started Part 7
- 8. Entity Framework 4.0 and ASP.NET – Getting Started Part 8
- Continuing with EF
- 1. Entity Framework 4.0 and the ObjectDataSource Control, Part 1: Getting Started
- 2. Entity Framework 4.0 and the ObjectDataSource Control, Part 2: Adding a Business Logic Layer and Unit Tests
- 3. Entity Framework 4.0 and the ObjectDataSource Control, Part 3: Sorting and Filtering
- 4. Handling Concurrency with the Entity Framework 4.0 in an ASP.NET Web Application
- 5. Maximizing Performance with the Entity Framework 4.0 in an ASP.NET Web Application
- 6. What's New in the Entity Framework 4.0
- ASP.NET AJAX
- 1. Understanding Partial Page Updates with ASP.NET AJAX
- 2. Understanding ASP.NET AJAX UpdatePanel Triggers
- 3. Understanding ASP.NET AJAX Authentication and Profile Application Services
- 4. Understanding ASP.NET AJAX Localization
- 5. Understanding ASP.NET AJAX Web Services
- 6. Understanding ASP.NET AJAX Debugging Capabilities
- Ajax Control Toolkit
- Getting Started
- 1. Get Started with the AJAX Control Toolkit (C#)
- 2. Using AJAX Control Toolkit Controls and Control Extenders (C#)
- 3. Creating a Custom AJAX Control Toolkit Control Extender (C#)
- 4. Get Started with the AJAX Control Toolkit (VB)
- 5. Using AJAX Control Toolkit Controls and Control Extenders (VB)
- 6. Creating a Custom AJAX Control Toolkit Control Extender (VB)
- Accordion
- Animation
- 1. Adding Animation to a Control (C#)
- 2. Executing Several Animations at Same Time (C#)
- 3. Executing Several Animations after Each Other (C#)
- 4. Animation Depending On a Condition (C#)
- 5. Picking One Animation Out Of a List (C#)
- 6. Animating in Response To User Interaction (C#)
- 7. Disabling Actions during Animation (C#)
- 8. Triggering an Animation in another Control (C#)
- 9. Modifying Animations From Server Side (C#)
- 10. Executing Animations Using Client-Side Code (C#)
- 11. Changing an Animation Using Client-Side Code (C#)
- 12. Animating an UpdatePanel Control (C#)
- 13. Dynamically Controlling UpdatePanel Animations (C#)
- 14. Adding Animation to a Control (VB)
- 15. Executing Several Animations at Same Time (VB)
- 16. Executing Several Animations after Each Other (VB)
- 17. Animation Depending On a Condition (VB)
- 18. Picking One Animation Out Of a List (VB)
- 19. Animating in Response To User Interaction (VB)
- 20. Disabling Actions during Animation (VB)
- 21. Triggering an Animation in another Control (VB)
- 22. Modifying Animations From Server Side (VB)
- 23. Executing Animations Using Client-Side Code (VB)
- 24. Changing an Animation Using Client-Side Code (VB)
- 25. Animating an UpdatePanel Control (VB)
- 26. Dynamically Controlling UpdatePanel Animations (VB)
- CascadingDropdown
- 1. Filling a List Using CascadingDropDown (C#)
- 2. Using CascadingDropDown with a Database (C#)
- 3. Presetting List Entries with CascadingDropDown (C#)
- 4. Using Auto-Postback with CascadingDropDown (C#)
- 5. Filling a List Using CascadingDropDown (VB)
- 6. Using CascadingDropDown with a Database (VB)
- 7. Presetting List Entries with CascadingDropDown (VB)
- 8. Using Auto-Postback with CascadingDropDown (VB)
- CollapsiblePanel
- ColorPicker
- ComboBox
- ConfirmButton
- DropShadow
- DynamicPopulate
- 1. Dynamically Populating a Control (C#)
- 2. Dynamically Populating a Control Using JavaScript Code (C#)
- 3. Using DynamicPopulate with a User Control And JavaScript (C#)
- 4. Dynamically Populating a Control (VB)
- 5. Dynamically Populating a Control Using JavaScript Code (VB)
- 6. Using DynamicPopulate with a User Control And JavaScript (VB)
- FilteredTextBox
- HoverMenu
- HTMLEditor
- ModalPopup
- 1. Launching a Modal Popup Window from Server Code (C#)
- 2. Using ModalPopup with a Repeater Control (C#)
- 3. Handling Postbacks from a ModalPopup (C#)
- 4. Positioning a ModalPopup (C#)
- 5. Launching a Modal Popup Window from Server Code (VB)
- 6. Using ModalPopup with a Repeater Control (VB)
- 7. Handling Postbacks from a ModalPopup (VB)
- 8. Positioning a ModalPopup (VB)
- MutuallyExclusiveCheckbox
- NoBot
- NumericUpDown
- PasswordStrength
- Popup
- 1. Using Multiple Popup Controls (C#)
- 2. Handling Postbacks from A Popup Control With an UpdatePanel (C#)
- 3. Handling Postbacks from A Popup Control Without an UpdatePanel (C#)
- 4. Using Multiple Popup Controls (VB)
- 5. Handling Postbacks from A Popup Control With an UpdatePanel (VB)
- 6. Handling Postbacks from A Popup Control Without an UpdatePanel (VB)
- Rating
- ReorderList
- Slider
- TextBoxWatermark
- Getting Started
- Data Access
- ASP.NET Data Access Content Map
- Model Binding
- Introduction
- Basic Reporting
- 1. Displaying Data With the ObjectDataSource (C#)
- 2. Declarative Parameters (C#)
- 3. Programmatically Setting the ObjectDataSource's Parameter Values (C#)
- 4. Displaying Data With the ObjectDataSource (VB)
- 5. Declarative Parameters (VB)
- 6. Programmatically Setting the ObjectDataSource's Parameter Values (VB)
- Master/Detail
- 1. Master/Detail Filtering With a DropDownList (C#)
- 2. Master/Detail Filtering With Two DropDownLists (C#)
- 3. Master/Detail Filtering Across Two Pages (C#)
- 4. Master/Detail Using a Selectable Master GridView with a Details DetailView (C#)
- 5. Master/Detail Filtering With a DropDownList (VB)
- 6. Master/Detail Filtering With Two DropDownLists (VB)
- 7. Master/Detail Filtering Across Two Pages (VB)
- 8. Master/Detail Using a Selectable Master GridView with a Details DetailView (VB)
- Custom Formatting
- 1. Custom Formatting Based Upon Data (C#)
- 2. Using TemplateFields in the GridView Control (C#)
- 3. Using TemplateFields in the DetailsView Control (C#)
- 4. FormView's Templates (C#)
- 5. Displaying Summary Information in the GridView's Footer (C#)
- 6. Custom Formatting Based Upon Data (VB)
- 7. Using TemplateFields in the GridView Control (VB)
- 8. Using TemplateFields in the DetailsView Control (VB)
- 9. FormView's Templates (VB)
- 10. Displaying Summary Information in the GridView's Footer (VB)
- Editing, Inserting, and Deleting Data
- 1. Overview of Inserting, Updating, and Deleting Data (C#)
- 2. Examining the Events Associated with Inserting, Updating, and Deleting (C#)
- 3. Handling BLL- and DAL-Level Exceptions in an ASP.NET Page (C#)
- 4. Adding Validation Controls to the Editing and Inserting Interfaces (C#)
- 5. Customizing the Data Modification Interface (C#)
- 6. Implementing Optimistic Concurrency (C#)
- 7. Adding Client-Side Confirmation When Deleting (C#)
- 8. Limiting Data Modification Functionality Based on the User (C#)
- 9. Overview of Inserting, Updating, and Deleting Data (VB)
- 10. Examining the Events Associated with Inserting, Updating, and Deleting (VB)
- 11. Handling BLL- and DAL-Level Exceptions in an ASP.NET Page (VB)
- 12. Adding Validation Controls to the Editing and Inserting Interfaces (VB)
- 13. Customizing the Data Modification Interface (VB)
- 14. Implementing Optimistic Concurrency (VB)
- 15. Adding Client-Side Confirmation When Deleting (VB)
- 16. Limiting Data Modification Functionality Based on the User (VB)
- Paging and Sorting
- 1. Paging and Sorting Report Data (C#)
- 2. Efficiently Paging Through Large Amounts of Data (C#)
- 3. Sorting Custom Paged Data (C#)
- 4. Creating a Customized Sorting User Interface (C#)
- 5. Paging and Sorting Report Data (VB)
- 6. Efficiently Paging Through Large Amounts of Data (VB)
- 7. Sorting Custom Paged Data (VB)
- 8. Creating a Customized Sorting User Interface (VB)
- Custom Button Actions
- Displaying Data with the DataList and Repeater
- 1. Displaying Data with the DataList and Repeater Controls (C#)
- 2. Formatting the DataList and Repeater Based Upon Data (C#)
- 3. Showing Multiple Records per Row with the DataList Control (C#)
- 4. Nested Data Web Controls (C#)
- 5. Displaying Data with the DataList and Repeater Controls (VB)
- 6. Formatting the DataList and Repeater Based Upon Data (VB)
- 7. Showing Multiple Records per Row with the DataList Control (VB)
- 8. Nested Data Web Controls (VB)
- Filtering Scenarios with the DataList and Repeater
- 1. Master/Detail Filtering With a DropDownList (C#)
- 2. Master/Detail Filtering Across Two Pages (C#)
- 3. Master/Detail Using a Bulleted List of Master Records with a Details DataList (C#)
- 4. Master/Detail Filtering With a DropDownList (VB)
- 5. Master/Detail Filtering Across Two Pages (VB)
- 6. Master/Detail Using a Bulleted List of Master Records with a Details DataList (VB)
- Editing and Deleting Data Through the DataList
- 1. Overview of Editing and Deleting Data in the DataList (C#)
- 2. Performing Batch Updates (C#)
- 3. Handling BLL- and DAL-Level Exceptions (C#)
- 4. Adding Validation Controls to the DataList's Editing Interface (C#)
- 5. Customizing the DataList's Editing Interface (C#)
- 6. Overview of Editing and Deleting Data in the DataList (VB)
- 7. Performing Batch Updates (VB)
- 8. Handling BLL- and DAL-Level Exceptions (VB)
- 9. Adding Validation Controls to the DataList's Editing Interface (VB)
- 10. Customizing the DataList's Editing Interface (VB)
- Paging and Sorting with the DataList and Repeater
- Custom Button Actions with the DataList and Repeater
- Accessing the Database Directly from an ASP.NET Page
- 1. Querying Data with the SqlDataSource Control (C#)
- 2. Using Parameterized Queries with the SqlDataSource (C#)
- 3. Inserting, Updating, and Deleting Data with the SqlDataSource (C#)
- 4. Implementing Optimistic Concurrency with the SqlDataSource (C#)
- 5. Querying Data with the SqlDataSource Control (VB)
- 6. Using Parameterized Queries with the SqlDataSource (VB)
- 7. Inserting, Updating, and Deleting Data with the SqlDataSource (VB)
- 8. Implementing Optimistic Concurrency with the SqlDataSource (VB)
- Enhancing the GridView
- 1. Adding a GridView Column of Radio Buttons (C#)
- 2. Adding a GridView Column of Checkboxes (C#)
- 3. Inserting a New Record from the GridView's Footer (C#)
- 4. Adding a GridView Column of Radio Buttons (VB)
- 5. Adding a GridView Column of Checkboxes (VB)
- 6. Inserting a New Record from the GridView's Footer (VB)
- Working with Binary Files
- 1. Uploading Files (C#)
- 2. Displaying Binary Data in the Data Web Controls (C#)
- 3. Including a File Upload Option When Adding a New Record (C#)
- 4. Updating and Deleting Existing Binary Data (C#)
- 5. Uploading Files (VB)
- 6. Displaying Binary Data in the Data Web Controls (VB)
- 7. Including a File Upload Option When Adding a New Record (VB)
- 8. Updating and Deleting Existing Binary Data (VB)
- Caching Data
- 1. Caching Data with the ObjectDataSource (C#)
- 2. Caching Data in the Architecture (C#)
- 3. Caching Data at Application Startup (C#)
- 4. Using SQL Cache Dependencies (C#)
- 5. Caching Data with the ObjectDataSource (VB)
- 6. Caching Data in the Architecture (VB)
- 7. Caching Data at Application Startup (VB)
- 8. Using SQL Cache Dependencies (VB)
- Database-Driven Site Maps
- Working with Batched Data
- Advanced Data Access Scenarios
- 1. Creating New Stored Procedures for the Typed DataSet's TableAdapters (C#)
- 2. Using Existing Stored Procedures for the Typed DataSet's TableAdapters (C#)
- 3. Updating the TableAdapter to Use JOINs (C#)
- 4. Adding Additional DataTable Columns (C#)
- 5. Working with Computed Columns (C#)
- 6. Configuring the Data Access Layer's Connection- and Command-Level Settings (C#)
- 7. Protecting Connection Strings and Other Configuration Information (C#)
- 8. Debugging Stored Procedures (C#)
- 9. Creating Stored Procedures and User-Defined Functions with Managed Code (C#)
- 10. Creating New Stored Procedures for the Typed DataSet's TableAdapters (VB)
- 11. Using Existing Stored Procedures for the Typed DataSet's TableAdapters (VB)
- 12. Updating the TableAdapter to Use JOINs (VB)
- 13. Adding Additional DataTable Columns (VB)
- 14. Working with Computed Columns (VB)
- 15. Configuring the Data Access Layer's Connection- and Command-Level Settings (VB)
- 16. Protecting Connection Strings and Other Configuration Information (VB)
- 17. Debugging Stored Procedures (VB)
- 18. Creating Stored Procedures and User-Defined Functions with Managed Code (VB)
- Master Pages
- 1. Creating a Site-Wide Layout Using Master Pages (C#)
- 2. Multiple ContentPlaceHolders and Default Content (C#)
- 3. Specifying the Title, Meta Tags, and Other HTML Headers in the Master Page (C#)
- 4. URLs in Master Pages (C#)
- 5. Control ID Naming in Content Pages (C#)
- 6. Interacting with the Master Page from the Content Page (C#)
- 7. Interacting with the Content Page from the Master Page (C#)
- 8. Master Pages and ASP.NET AJAX (C#)
- 9. Specifying the Master Page Programmatically (C#)
- 10. Nested Master Pages (C#)
- 11. Creating a Site-Wide Layout Using Master Pages (VB)
- 12. Multiple ContentPlaceHolders and Default Content (VB)
- 13. Specifying the Title, Meta Tags, and Other HTML Headers in the Master Page (VB)
- 14. URLs in Master Pages (VB)
- 15. Control ID Naming in Content Pages (VB)
- 16. Interacting with the Master Page from the Content Page (VB)
- 17. Interacting with the Content Page from the Master Page (VB)
- 18. Master Pages and ASP.NET AJAX (VB)
- 19. Specifying the Master Page Programmatically (VB)
- 20. Nested Master Pages (VB)
- Security
- Introduction
- Membership
- 1. Creating the Membership Schema in SQL Server (C#)
- 2. Creating User Accounts (C#)
- 3. Validating User Credentials Against the Membership User Store (C#)
- 4. User-Based Authorization (C#)
- 5. Storing Additional User Information (C#)
- 6. Creating the Membership Schema in SQL Server (VB)
- 7. Creating User Accounts (VB)
- 8. Validating User Credentials Against the Membership User Store (VB)
- 9. User-Based Authorization (VB)
- 10. Storing Additional User Information (VB)
- Roles
- Admin
- 1. Building an Interface to Select One User Account from Many (C#)
- 2. Recovering and Changing Passwords (C#)
- 3. Unlocking and Approving User Accounts (C#)
- 4. Building an Interface to Select One User Account from Many (VB)
- 5. Recovering and Changing Passwords (VB)
- 6. Unlocking and Approving User Accounts (VB)
- Deployment
- ASP.NET Web Deployment using Visual Studio 2012
- 1. Introduction
- 2. Preparing for Database Deployment
- 3. Web.config File Transformations
- 4. Project Properties
- 5. Deploying to Test
- 6. Setting Folder Permissions
- 7. Deploying to Production
- 8. Deploying a Code Update
- 9. Deploying a Database Update
- 10. Command Line Deployment
- 11. Deploying Extra Files
- 12. Troubleshooting
- ASP.NET Web Deployment with SQL Server Compact using Visual Studio
- 1. Visual Studio Web Deployment with SQL Server Compact - Introduction
- 2. Visual Studio Web Deployment with SQL Server Compact- Deploying SQL Server Compact Databases
- 3. Visual Studio Web Deployment with SQL Server Compact - Web.Config File Transformations
- 4. Visual Studio Web Deployment with SQL Server Compact - Configuring Project Properties
- 5. Visual Studio Web Deployment with SQL Server Compact - Deploying to IIS as a Test Environment
- 6. Visual Studio Web Deployment with SQL Server Compact - Setting Folder Permissions
- 7. Visual Studio Web Deployment with SQL Server Compact - Deploying to the Production Environment
- 8. Visual Studio Web Deployment with SQL Server Compact - Deploying a Code-Only Update
- 9. Visual Studio Web Deployment with SQL Server Compact - Deploying a Database Update
- 10. Visual Studio Web Deployment with SQL Server Compact - Migrating to SQL Server
- 11. Visual Studio Web Deployment with SQL Server Compact - Deploying a SQL Server Database Update
- 12. Visual Studio Web Deployment with SQL Server Compact - Troubleshooting
- Deploying Web Site Projects
- 1. ASP.NET Hosting Options (C#)
- 2. Determining What Files Need to Be Deployed (C#)
- 3. Deploying Your Site Using an FTP Client (C#)
- 4. Deploying Your Site Using Visual Studio (C#)
- 5. Common Configuration Differences Between Development and Production (C#)
- 6. Core Differences Between IIS and the ASP.NET Development Server (C#)
- 7. Deploying a Database (C#)
- 8. Configuring the Production Web Application to Use the Production Database (C#)
- 9. Configuring a Website that Uses Application Services (C#)
- 10. Strategies for Database Development and Deployment (C#)
- 11. Displaying a Custom Error Page (C#)
- 12. Processing Unhandled Exceptions (C#)
- 13. Logging Error Details with ASP.NET Health Monitoring (C#)
- 14. Logging Error Details with ELMAH (C#)
- 15. Precompiling Your Website (C#)
- 16. Users and Roles On Production Website (C#)
- 17. ASP.NET Hosting Options (VB)
- 18. Determining What Files Need to Be Deployed (VB)
- 19. Deploying Your Site Using an FTP Client (VB)
- 20. Deploying Your Site Using Visual Studio (VB)
- 21. Common Configuration Differences Between Development and Production (VB)
- 22. Core Differences Between IIS and the ASP.NET Development Server (VB)
- 23. Deploying a Database (VB)
- 24. Configuring the Production Web Application to Use the Production Database (VB)
- 25. Configuring a Website that Uses Application Services (VB)
- 26. Strategies for Database Development and Deployment (VB)
- 27. Displaying a Custom Error Page (VB)
- 28. Processing Unhandled Exceptions (VB)
- 29. Logging Error Details with ASP.NET Health Monitoring (VB)
- 30. Logging Error Details with ELMAH (VB)
- 31. Precompiling Your Website (VB)
- 32. Users and Roles On Production Website (VB)
- Enterprise Deployment Series Introduction: Deploying Web Applications in Enterprise Scenarios
- Enterprise Deployment Series 1: Web Deployment in the Enterprise
- 1. Web Deployment in the Enterprise
- 2. The Contact Manager Solution
- 3. Setting Up the Contact Manager Solution
- 4. Understanding the Project File
- 5. Understanding the Build Process
- 6. Building and Packaging Web Application Projects
- 7. Configuring Parameters for Web Package Deployment
- 8. Deploying Web Packages
- 9. Deploying Database Projects
- 10. Creating and Running a Deployment Command File
- 11. Manually Installing Web Packages
- Enterprise Deployment Series 2: Configuring Server Environments for Web Deployment
- 1. Configuring Server Environments for Web Deployment
- 2. Choosing the Right Approach to Web Deployment
- 3. Scenario: Configuring a Test Environment for Web Deployment
- 4. Scenario: Configuring a Staging Environment for Web Deployment
- 5. Scenario: Configuring a Production Environment for Web Deployment
- 6. Configuring a Web Server for Web Deploy Publishing (Remote Agent)
- 7. Configuring a Web Server for Web Deploy Publishing (Web Deploy Handler)
- 8. Configuring a Web Server for Web Deploy Publishing (Offline Deployment)
- 9. Configuring a Database Server for Web Deploy Publishing
- 10. Creating a Server Farm with the Web Farm Framework
- 11. Configuring Deployment Properties for a Target Environment
- Enterprise Deployment Series 3: Configuring Team Foundation Server for Web Deployment
- 1. Configuring Team Foundation Server for Web Deployment
- 2. Creating a Team Project in TFS
- 3. Adding Content to Source Control
- 4. Configuring a TFS Build Server for Web Deployment
- 5. Creating a Build Definition That Supports Deployment
- 6. Deploying a Specific Build
- 7. Configuring Permissions for Team Build Deployment
- Enterprise Deployment Series 4: Advanced Enterprise Web Deployment
- 1. Advanced Enterprise Web Deployment
- 2. Performing a "What If" Deployment
- 3. Customizing Database Deployments for Multiple Environments
- 4. Deploying Database Role Memberships to Test Environments
- 5. Deploying Membership Databases to Enterprise Environments
- 6. Excluding Files and Folders from Deployment
- 7. Taking Web Applications Offline with Web Deploy
- 8. Running Windows PowerShell Scripts from MSBuild Project Files
- 9. Troubleshooting the Packaging Process
- ASP.NET Web Deployment using Visual Studio 2012
- Moving to ASP.NET 2.0
- Tailspin Spyworks
- Hands On Labs
Creating a Numeric Up/Down Control with a Web Service Backend (VB)
Instead of letting a user type a value into a check box, a numeric up/down control (that exists on Windows and other operating systems) could prove as more comfortable. By default, the NumericUpDown control always increases or decreases a value by 1, but a web service proves more flexibility.
Overview
Instead of letting a user type a value into a check box, a numeric up/down control
(that exists on Windows and other operating systems) could prove as more comfortable.
By default, the NumericUpDown
control always increases or decreases a value by 1,
but a web service proves more flexibility.
Steps
The ASP.NET AJAX Control Toolkit contains the NumericUpDown
extender which automatically
adds two buttons to a text box: One for increasing its value, one for decreasing
it. However the control also supports a web service call (or page method call).
Whenever the up or down button is clicked, the JavaScript code connects to the web
server and executes a method there. The method signature is the following one:
Function MethodName(ByVal current As Integer, ByVal tag As String) As Integer
The current
argument is the current value in the text box; the tag
attribute is
additional context data that can be set as a property of the NumericUpDown
extender
(but is not required).
For this sample, the numeric up/down control shall only allow values that are powers of two: 1, 2, 4, 8, 16, 32, 64, and so on. Therefore, the method executed when the user wants to increase the value must double the old value; the other method must divide value by two. So here is the complete web service:
<%@ WebService Language="VB" Class="NumericUpDown1" %>
Imports System.Web
Imports System.Web.Services
Imports System.Web.Services.Protocols
<System.Web.Script.Services.ScriptService()> _
Public Class NumericUpDown1
Inherits System.Web.Services.WebService
<WebMethod()> _
Function Up(ByVal current As Integer, ByVal tag As String) As Integer
If current <= 536870912 Then
Return current * 2
Else
Return current
End If
End Function
<WebMethod()> _
Function Down(ByVal current As Integer, ByVal tag As String) As Integer
If current >= 2 Then
Return CInt(current / 2)
Else
Return current
End If
End Function
End Class
Finally, create a new ASP.NET page. As usual, you need a ScriptManager
control,
a TextBox
control and a NumericUpDownExtender
control. For the latter, you have
to provide the web service information:
ServiceDownMethod
name of the down web method or page methodServiceDownPath
path to the web service with the down service method; omit if you are using a page methodServiceUpMethod
name of the up web method or page methodServiceUpPath
path to the web service with the up service method; omit if you are using a page method
Here is the complete markup for the page:
<%@ Page Language="VB" %>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Control Toolkit</title>
</head>
<body>
<form id="form1" runat="server">
<asp:ScriptManager ID="asm" runat="server" />
<div>
How many MB do you want? <asp:TextBox ID="TextBox1" Text="32" runat="server" />
<ajaxToolkit:NumericUpDownExtender ID="nud" runat="server"
TargetControlID="TextBox1" Width="100"
ServiceUpPath="NumericUpDown1.vb.asmx" ServiceDownPath="NumericUpDown1.vb.asmx"
ServiceUpMethod="Up" ServiceDownMethod="Down" />
</div>
</form>
</body>
</html>
If you run the page, notice how the value in the text box always doubles when you click on the upper button, and is halved when you click on the lower button.
Only numbers that are a power of 2 appear (Click to view full-size image)

By Christian Wenz, Christian Wenz is an author, trainer, and consultant. His main focus of working and writing is on web technologies and security. Christian has written or co-written over 100 books for various publishers. He works with both open source and closed source web technologies. This leads to the unusual situation that he has both been awarded a Microsoft MVP for ASP/ASP.NET and is listed in Zend's Who is Who of PHP. He is also listed in Mozilla's credits (about:credits) and is considered an expert in browser-agnostic JavaScript.
- ← PreviousCreating a Numeric Up/Down Control with a Web Service Backend (C#)
- You're ViewingCreating a Numeric Up/Down Control with a Web Service Backend (VB)
Comments (0) RSS Feed