Introduction:
NumericUpDown is an ASP.NET AJAX extender that can be attached to an ASP.NET TextBox control to add "up" and "down" buttons that increment and decrement the value in the TextBox. The increment and decrement can be simple +1/-1 arithmetic, they can cycle through a provided list of values (like the months of the year), or they can call a Web Service to determine the next value. Page authors can also provide custom images to be used instead of the default up/down button graphics.
NumericUpDown is an ASP.NET AJAX extender that can be attached to an ASP.NET TextBox control to add "up" and "down" buttons that increment and decrement the value in the TextBox. The increment and decrement can be simple +1/-1 arithmetic, they can cycle through a provided list of values (like the months of the year), or they can call a Web Service to determine the next value. Page authors can also provide custom images to be used instead of the default up/down button graphics.
Description:
The display of the default up/down buttons in Safari is such that Safari's "shiny" button style makes the up/down arrows difficult to see. Custom images can be used for complete control over the appearance.
The display of the default up/down buttons in Safari is such that Safari's "shiny" button style makes the up/down arrows difficult to see. Custom images can be used for complete control over the appearance.
<%@ Page Language="C#" AutoEventWireup="true" %>
<%@ Register Assembly="AjaxControlToolkit" Namespace="AjaxControlToolkit"
TagPrefix="cc1"
%>
<!DOCTYPE html
PUBLIC "-//W3C//DTD
XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<script runat="server">
protected
void Button1_Click(object
sender, EventArgs e)
{
Label1.ForeColor =
System.Drawing.Color.FromName(TextBox1.Text);
}
</script>
<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
<title>Ajax
NumericUpDownExtender RefValues - Using text in NumericUpDownExtender in
asp.net ajax</title>
</head>
<body>
<form id="form1" runat="server">
<div>
<h2 style="color: SeaGreen; font-style:
italic;">
Ajax NumericUpDownExtender
Example: Using RefValues</h2>
<hr width="600" align="left" color="LawnGreen" />
<br />
<br />
<asp:ScriptManager ID="ScriptManager1" runat="server">
</asp:ScriptManager>
<cc1:NumericUpDownExtender ID="NumericUpDownExtender1" runat="server"
TargetControlID="TextBox1"
Width="200" RefValues="Crimson;DeepPink;DodgerBlue;HotPink;DarkSalmon;IndianRed;DarkSeaGreen;SeaGreen">
</cc1:NumericUpDownExtender>
<asp:Label ID="Label1" runat="server" Text="Change this text color." Font-Bold="true"
Font-Size="X-Large" Font-Names="Comic Sans MS">
</asp:Label>
<br />
<br />
<br />
<asp:TextBox ID="TextBox1" runat="server" Font-Bold="true" ForeColor="IndianRed"
BackColor="LightGoldenrodYellow">
</asp:TextBox>
<asp:Button ID="Button1" runat="server" Text="Change Label" Font-Bold="true" OnClick="Button1_Click"
ForeColor="IndianRed" Height="30" />
</div>
</form>
</body>
</html>
|
0 comments :
Post a Comment