加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 综合聚焦 > 服务器 > 安全 > 正文

NumericUpDownExtender

发布时间:2020-12-17 02:34:01 所属栏目:安全 来源:网络整理
导读:html xmlns="http://www.w3.org/1999/xhtml" head runat="server" ??? titleNumericUpDownExtender/title /head body ??? form id="form1" runat="server" ??? asp:ScriptManager ID="ScriptManager1" runat="server" ??? /asp:ScriptManager ??? div ??????

<html xmlns="http://www.w3.org/1999/xhtml" >
<head runat="server">
??? <title>NumericUpDownExtender</title>
</head>
<body>
??? <form id="form1" runat="server">
??? <asp:ScriptManager ID="ScriptManager1" runat="server">
??? </asp:ScriptManager>
??? <div>
????????? Enter a numeric value and use
???????? <br />
???????? the up and down buttons to increment/decrement &nbsp; &nbsp; &nbsp;<asp:TextBox ID="TextBox1"
??????????? runat="server">0</asp:TextBox>
??????? <br />
????????? <br />
?????????? Choose your favorite month &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
????????? <asp:TextBox ID="TextBox2" runat="server"></asp:TextBox><br />
???????? <br />
??????????? Let the web service pick a random number
?????????? <br />
??????????? between 0 and 1000 that is higher/lower
????????? <br />
??????????? than the displayed value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
?????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp;
?????????? <asp:TextBox ID="TextBox3" runat="server">0</asp:TextBox><br />
?????????? <br />
?????????? Use the arrow images to increment/decrement &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
?????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
?????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;
??????????? <br />
???????????? the value &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? <asp:TextBox ID="TextBox4" runat="server" ></asp:TextBox>
??????????? <asp:ImageButton ID="ImageButton2" runat="server" Width="15px" Height="15px" ImageUrl="~/up.gif" />
??????????? &nbsp;
??????????? <br />
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;
??????????? <asp:ImageButton ID="ImageButton1" runat="server" Width="15px" Height="15px" ImageUrl="~/down.gif" /><br />
?????????????? <cc1:NumericUpDownExtender ID="NumericUpDownExtender1" TargetControlID="TextBox1" Width="150"??? runat="server">
??????????? </cc1:NumericUpDownExtender>
??????????? <cc1:NumericUpDownExtender ID="NumericUpDownExtender2" TargetControlID="TextBox2" Width="150" RefValues="January;February;March;April;May;June;July;August;September;October;November;December" runat="server">
??????????? </cc1:NumericUpDownExtender>
??????????? <cc1:NumericUpDownExtender ID="NumericUpDownExtender3" TargetControlID="TextBox3" Width="150" ServiceUpPath="WebService1.asmx" ServiceUpMethod="NextNumber" ServiceDownPath="WebService1.asmx" ServiceDownMethod="PreNumber" runat="server">
??????????? </cc1:NumericUpDownExtender>
??????????? <cc1:NumericUpDownExtender ID="NumericUpDownExtender4" TargetControlID="TextBox4" Width="150" TargetButtonUpID="ImageButton2" TargetButtonDownID="ImageButton1" runat="server">
??????????? </cc1:NumericUpDownExtender>
??? </div>
??? </form>
</body>
</html>


=======webservers=====

?

[WebService(Namespace = "http://tempuri.org/")]
??? [WebServiceBinding(ConformsTo = WsiProfiles.BasicProfile1_1)]
??? [System.Web.Script.Services.ScriptService]
?? // [ToolboxItem(false)]
??? // 若要允许使用 ASP.NET AJAX 从脚本中调用此 Web 服务,请取消对下行的注释。
??? // [System.Web.Script.Services.ScriptService]
??? public class WebService1 : System.Web.Services.WebService
??? {
?????????????? [WebMethod]
????? public int NextNumber(int current,string tag)
??????? {
??????????? Random r1 = new Random();
??????????? return r1.Next(Math.Min(Math.Max(0,current),1000),1001);
??
??????? }
??????? [WebMethod]
??????? public int PreNumber(int current,string tag)
??????? {

??????????? Random r2 = new Random();??????????? return r2.Next(0,Math.Min(Math.Max(0,1000));??????? }??? }

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读