ASCII文件中使用的范围验证器 [英] Range validator used in ascx file
本文介绍了ASCII文件中使用的范围验证器的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
Rangevalidator默认接受日期格式,例如mm/dd/yyyy ..如何将其更改为dd-MMM-yyyy格式以设置日历用户控件的最小日期和最大日期
Rangevalidator by default accept Date Format like this mm/dd/yyyy ..how can i change this to dd-MMM-yyyy format to set min date and max date for calender user control
How to change the format of Range Validator?
推荐答案
您可以使用自定义DateTime范围验证器".示例:
点击
You can use Custom DateTime Range Validator. Example:
Click
请尝试在压光机控件上设置区域性.使用以下代码创建区域性对象.将此对象设置为压光机控件并检查.
Please try by setting a culture to the calender control. Use the following code to create the culture object. Set this object to the calender control and check.
CultureInfo ci = new CultureInfo("en-us", false);<br />
ci.DateTimeFormat.ShortDatePattern = "dd-MMM-yyyy";<br />
这篇关于ASCII文件中使用的范围验证器的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文