ASP.net中datetimepicker的代码 [英] CODE for datetimepicker in ASP.net

查看:82
本文介绍了ASP.net中datetimepicker的代码的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

嗨朋友
我的要求是我需要两个文本框,其中一个文本框用于显示日期,另一个文本框用于显示时间.并通过此文本框更改日期和时间.
我通过工具箱中的datetimepicker控件在C#窗口表单中完成了同样的事情,但是该控件在ASP.net中不可用,我如何在ASP.net中设计datetimepicker,请帮助我

hi friends
my requirement is i need two text box in that one text box for date another text box is for time will be display. and by this text box we change date and time.
same thing i done in C# window forms through datetimepicker control from toolbox but this control is not available in the ASP.net, how can i design the datetimepicker in ASP.net pl help me

推荐答案

那里有大量的日期和日期时间选择器,根据定义,它们都使用javascript.找到您喜欢的一个,并将其集成到您的网站中.
There''s a ton of date and date time pickers out there, all of them use javascript, by definition. Find one you like, and integrate it into your site.


pradeep kumar patwari写道:
pradeep kumar patwari wrote:

我可以吗?在ASP.net中设计datetimepicker

can i design the datetimepicker in ASP.net



是的你可以.或者,您可以从互联网上获得众多示例之一.实现日期/时间控件的一种常用方法是使用一系列下拉列表-一个下拉列表,一个下拉列表,一个下拉列表,一个下拉列表,一个下拉列表,一个下拉列表,一个下拉列表,最后一个下拉列表,然后针对每个下拉列表设置验证条件.



Yes you can. Or you could get one of the many examples on the internet. One common way of implementing a date/time control is to use a series of dropdown lists - one for day, one for month, one for year, and then have validation criteria against them.


这是用于窗口应用程序

在您的表单中添加日期时间选择器
代码:
字符串fromdate;
fromdate = dateTimePicker1.Text;
this is for window application

add datetime picker in your form
code:
string fromdate;
fromdate = dateTimePicker1.Text;


这篇关于ASP.net中datetimepicker的代码的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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