积极答复者
关于MVC3.0的Editor Template

问题
答案
-
但问题是我是想创建一个项目,里面所有的TEXTBOX都应该是空的,这个应该怎么弄才好啊。把显示格式的内容去掉?
video edit
设法在这个类的构造函数中为这个类的Date属性设置默认值:DateTime.Now,比如:public class A
{
[DataType(DataType.Date)]
public property DateTime My{get;set;}
………………
public A()
{
My = DateTime.Now;
}
}
如果你有其它意见或私下交流,请直接发送maledong_work@foxmail.com;或者
If you do not have QQ, please open the page and download it and click the image to talk or leave message for me.
下载MSDN桌面工具(Vista,Win7)
下载Technet桌面小工具(Vista,Win7)
慈善点击,点击此处- 已标记为答案 Song TianModerator 2011年10月31日 9:44
全部回复
-
是的。你在一个属性上加了“ [DataType(DataType.Date)]”,就意味着你的这个属性必须是满足DataType.Date格式的内容(其内容必须可以转化成日期)。否则是会报错的。
如果你有其它意见或私下交流,请直接发送maledong_work@foxmail.com;或者
If you do not have QQ, please open the page and download it and click the image to talk or leave message for me.
下载MSDN桌面工具(Vista,Win7)
下载Technet桌面小工具(Vista,Win7)
慈善点击,点击此处 -
但问题是我是想创建一个项目,里面所有的TEXTBOX都应该是空的,这个应该怎么弄才好啊。把显示格式的内容去掉?
video edit
设法在这个类的构造函数中为这个类的Date属性设置默认值:DateTime.Now,比如:public class A
{
[DataType(DataType.Date)]
public property DateTime My{get;set;}
………………
public A()
{
My = DateTime.Now;
}
}
如果你有其它意见或私下交流,请直接发送maledong_work@foxmail.com;或者
If you do not have QQ, please open the page and download it and click the image to talk or leave message for me.
下载MSDN桌面工具(Vista,Win7)
下载Technet桌面小工具(Vista,Win7)
慈善点击,点击此处- 已标记为答案 Song TianModerator 2011年10月31日 9:44