>How did you code that? You probably need to use typeof(DateTime) and a string value:
>
>
>[DefaultValue(typeof(DateTime), "5/27/08")]
>
>
>I'm not sure (because I haven't actually tried it), but you *might* be able to get away with this:
>
>
>[DefaultValue(typeof(DateTime), DateTime.Today.ToString())]
>
>
>~~Bonnie
>
The second version didn't work, but the first did. I was trying DefaultValue(DateTime.Today) and also was trying to use Convert class, but didn't think of adding typeof at the beginning.
If it's not broken, fix it until it is.
My Blog