如何在gridview中更改文本框的日期格式编辑项目模板 [英] How to change the date format of textbox in gridview Edit Item Template

查看:195
本文介绍了如何在gridview中更改文本框的日期格式编辑项目模板的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


如何在gridview中更改文本框的日期格式编辑项目模板

当前格式2011年11月10日12:00:00

需要更改MM-dd-yyyy

谢谢

Hi
How to change the date format of textbox in gridview Edit Item Template

current format 11/10/2011 12:00:00

need to change MM-dd-yyyy

Thanks

推荐答案

您必须在运行时或表达式中对其进行更改
请阅读以下文章,以了解有关C#中日期格式的更多信息
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx [ ^ ]
You have to change it runtime or in expression
Please read below article to learn more about date formatting in C#
http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx[^]


您必须在运行时或表达式中对其进行更改


请阅读以下文章,以了解有关C#中日期格式化的更多信息


http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx
You have to change it runtime or in expression


Please read below article to learn more about date formmating in C#


http://msdn.microsoft.com/en-us/library/8kb3ddd4.aspx




我建议您使用 MaskedEdit Extender [AjaxControlToolKit [ ^ ].
这样,您便可以进行验证,并且您的网站将变得更加有用...
在其站点上提供了如何使用每个控件的示例!
Hi,

I suggest you to use MaskedEdit Extender[^] from AjaxControlToolKit [^].
That way you have validation and your site will be more usable...
Examples how each control is used are provided on their site!


这篇关于如何在gridview中更改文本框的日期格式编辑项目模板的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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