时间选择器在Asp.net [英] Time picker In Asp.net

查看:76
本文介绍了时间选择器在Asp.net的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我想使用一些TimePicker选择时间并将其存储在数据库中.
我该怎么做 ? asp.net中是否存在时间选择器?

I want to select Time using some TimePicker and stored it in database.
how can i do it ? is there time picker exist in asp.net ?

推荐答案

我认为您需要页面上的TimerPicker控件,用户可以在其中选择他的约会时间,然后保存那时在您的数据库中.
好的,这是一个很好的控件 [ ^ ].

或者,您可以使用三个不同的DropDownList来实现此目的,一个为数小时,一个为数分钟,一个为数秒.
I think you want a TimerPicker control on your page, where user can select his appointment time and you want to save that time in your database.
Ok here is a good control[^] for Asp.Net.

OR you can use three different DropDownList to achieve this, one for hours, one for minutes and one for seconds.


<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
    <script type="text/javascript">
        function TimeToShow() {
            var dt = new Date();            
            var la = document.getElementById("<%= Timer.ClientID %>");
             la.innerHTML = dt.toLocaleTimeString();
            window.setTimeout(TimeToShow, 1000);          
        }
    </script>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    <asp:label id="Timer" runat="server" text="Timer" xmlns:asp="#unknown"></asp:label>
    <asp:button id="btnStart" runat="server" text="Start" xmlns:asp="#unknown" />   
    </div>
    </form>
</body>
</html>


只需访问此链接,它将解决您的问题...

http://www.asp.net/community/control-gallery/Item.aspx? i = 3221 [ ^ ]


如果知道了,那就接受我的回答,并给它评分..
Just visit this link it will solve your problem...

http://www.asp.net/community/control-gallery/Item.aspx?i=3221[^]


If you got it then accept my ans as ans and also rate it..


这篇关于时间选择器在Asp.net的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆