I used your VB example and that is what returned the error message.
"Peter Blum" <PLBlum@Blum.info> wrote in message
news:uriAhg17EHA.2196@TK2MSFTNGP11.phx.gbl...
> I'm sorry, my code example had an error that was in C#. I wrote:
> System.Globalization.CultureInfo vCulture
> when it should have been
> Dim vCulture As System.Globalization.CultureInfo
>
> Sir, you are the programmer. You should understand the basics of declaring
> variables in your language and should be able to look up the class
> CultureInfo in the .net docs to get all of your answers. Please use the
> .net docs to learn about a class and allow this forum to point out the
> technology and help clarify when you don't understand what the docs say.
> Otherwise, you are wasting your time waiting for an answer and looking
> very lazy to the rest of us.
>
> If you don't know where the .net docs are, they are at
>
http://msdn.microsoft.com/library. >
> --- Peter Blum
>
www.PeterBlum.com > Email: PLBlum@PeterBlum.com
> Creator of "Professional Validation And More" at
>
http://www.peterblum.com/vam/home.aspx >
> "EmJayEm" <Woo@eookie.com> wrote in message
> news:XMZAd.695$aS6.184@fe1.news.blueyonder.co.uk...
>> "Peter Blum" <PLBlum@Blum.info> wrote in message
>> news:OqQ99hp7EHA.2032@tk2msftngp13.phx.gbl...
>>> There are several solutions:
>>>
>>> 1. You don't need to use a CustomValidator. The CompareValidator does
>>> it. Set its Operator to DataTypeCheck and Type=Date. Make sure the
>>> current thread has a CultureInfo object that reflects your desired
>>> ShortDatePattern. See my comments on this thread:
>>>
http://www.asp.net/Forums/ShowPost.aspx?tabindex=1&PostID=785630 >>
>>
>> I have tried implementing solution 1 and I get the following error
>> message:
>>
>> Compiler Error Message: BC30691: 'CultureInfo' is a type in
>> 'Globalization' and cannot be used as an expression.
>>
>> Source Error:
>>
>>
>> Line 38: end if
>> Line 39:
>> Line 40: System.Globalization.CultureInfo vCulture =
>> CType(System.Globalization.CultureInfo.CreateSpecificCulture("en-GG").Clone(),
>> System.Globalization.CultureInfo)
>> Line 41: vCulture.DateTimeFormat.ShortDatePattern =
>> "dd/MM/yyyy"
>> Line 42: System.Threading.Thread.CurrentThread.CurrentUICulture =
>> vCulture
>>
>>
>> I have added the namespace system.globalisation
>>
>> Can you help?
>>
>> EmJ.
>>
>>
>
>