By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
444,017 Members | 1,158 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 444,017 IT Pros & Developers. It's quick & easy.

NET1.1: RangeValidator doesn't work with Hungarian DateTime

P: n/a
Hi,

I'm working in a team developing an international website. When I set the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't seem
to be able to parse a TextBox's date value (Exception message see below)
correctly.

The TextBox's value is coming from the DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate' cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006. 07. 11.' of
the MaximumValue property of 'rngDate' cannot be converted to type 'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...
Jul 11 '06 #1
Share this Question
Share on Google+
11 Replies


P: n/a
Hi Axel,

Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?

Regards,
Frank

Hi,

I'm working in a team developing an international website. When I set the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't seem
to be able to parse a TextBox's date value (Exception message see below)
correctly.

The TextBox's value is coming from the DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate' cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006. 07. 11.' of
the MaximumValue property of 'rngDate' cannot be converted to type 'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...

Jul 11 '06 #2

P: n/a
Well, I guess so,

the value is coming from .NET so it should be alright. It works for all the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}

TIA,
Axel

----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,

Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?

Regards,
Frank

Hi,

I'm working in a team developing an international website. When I set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't
seem
to be able to parse a TextBox's date value (Exception message see below)
correctly.

The TextBox's value is coming from the DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006. 07. 11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...

Jul 11 '06 #3

P: n/a
Hi Axel,

I'm a bit speculating because I'm everything else but an expert in using
CultureInfo:
Could there be a connection with the Regional Settings in Control Panel
so that Windows itself isn't Hungarian and the Windows date format overrides
the CultureInfo?

Regards,
Frank

Well, I guess so,

the value is coming from .NET so it should be alright. It works for all the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}

TIA,
Axel

----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,

Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?

Regards,
Frank

Hi,
>
I'm working in a team developing an international website. When I set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't
seem
to be able to parse a TextBox's date value (Exception message see below)
correctly.
>
The TextBox's value is coming from the DateTime.Now.ToShortDateString()
function, so it's an original .NET value.
>
Can someone please help me out on this? I need to be able to get this
application running until end of the week.
>
TIA,
Axel Dahmen
>
------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.
>
Exception Details: System.Web.HttpException: The value '2006. 07. 11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.
>
Stack Trace:
>
[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...
>
>

Jul 11 '06 #4

P: n/a
Nope. Everything else's working fine in Hungarian, I'm afraid...

"Frank Lehmann" <f.******@chat4world.comwrote in message
news:eS**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,

I'm a bit speculating because I'm everything else but an expert in using
CultureInfo:
Could there be a connection with the Regional Settings in Control Panel
so that Windows itself isn't Hungarian and the Windows date format
overrides
the CultureInfo?

Regards,
Frank

Well, I guess so,

the value is coming from .NET so it should be alright. It works for all
the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}

TIA,
Axel

----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,
>
Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?
>
Regards,
Frank
>
>
Hi,

I'm working in a team developing an international website. When I
set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator
doesn't
seem
to be able to parse a TextBox's date value (Exception message see
below)
correctly.

The TextBox's value is coming from the
DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get
this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006. 07.
11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter
writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...

Jul 11 '06 #5

P: n/a
I'm sorry, I must pass there. No further idea.
Nope. Everything else's working fine in Hungarian, I'm afraid...
Jul 11 '06 #6

P: n/a
So this topic remains unsolved.. desperately searching for thoughts -
anyone, please?

--------------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:O4**************@TK2MSFTNGP04.phx.gbl...
I'm sorry, I must pass there. No further idea.
Nope. Everything else's working fine in Hungarian, I'm afraid...

Jul 11 '06 #7

P: n/a
Hi Axel,

Me once again. I've tested the following code in VB2003 .NET 1.1:

Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")

RangeValidator1.MaximumValue = DateTime.Now.ToShortDateString

without any errors.

RangeValidator1.MaximumValue then is '2006. 07. 11.'

There is one question I have about your code:
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
I can't figure out what value you have for value.ToShortDateString().
Can it be converted to a valid date string?
Would
set {rngDate.MaximumValue=DateTime.Now.ToShortDateStri ng();}
run without error?

Regards,
Frank

Well, I guess so,

the value is coming from .NET so it should be alright. It works for all the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}

TIA,
Axel

----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,

Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?

Regards,
Frank

Hi,
>
I'm working in a team developing an international website. When I set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator doesn't
seem
to be able to parse a TextBox's date value (Exception message see below)
correctly.
>
The TextBox's value is coming from the DateTime.Now.ToShortDateString()
function, so it's an original .NET value.
>
Can someone please help me out on this? I need to be able to get this
application running until end of the week.
>
TIA,
Axel Dahmen
>
------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.
>
Exception Details: System.Web.HttpException: The value '2006. 07. 11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.
>
Stack Trace:
>
[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...
>
>

Jul 11 '06 #8

P: n/a
Hi Frank,

where are you setting this value? I'm setting it at Page_Init()

Value, in fact, is coming from DateTime.Now. I've set up a second page
setting DateTime.Now.ToShortDateString() - same error.

From the error message in my first posting one can see that the value
provided is correct. The stack trace shows that the error is somewhere deep
inside the RangeValidator control.

PLEEEASEE HEEEELP - anyone...

TIA,
Axel

-----------------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:es*************@TK2MSFTNGP05.phx.gbl...
Hi Axel,

Me once again. I've tested the following code in VB2003 .NET 1.1:

Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")

RangeValidator1.MaximumValue = DateTime.Now.ToShortDateString

without any errors.

RangeValidator1.MaximumValue then is '2006. 07. 11.'

There is one question I have about your code:
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****

I can't figure out what value you have for value.ToShortDateString().
Can it be converted to a valid date string?
Would
set {rngDate.MaximumValue=DateTime.Now.ToShortDateStri ng();}
run without error?

Regards,
Frank

Well, I guess so,

the value is coming from .NET so it should be alright. It works for all
the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}

TIA,
Axel

----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,
>
Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?
>
Regards,
Frank
>
>
Hi,

I'm working in a team developing an international website. When I
set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator
doesn't
seem
to be able to parse a TextBox's date value (Exception message see
below)
correctly.

The TextBox's value is coming from the
DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get
this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006. 07.
11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter
writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...

Jul 12 '06 #9

P: n/a
One more note: Perhaps it's important to know that we're using American
Windows 2000 clients and servers. Perhaps they're behaving differently from
German versions?

TIA,
Axel Dahmen
Jul 12 '06 #10

P: n/a
Hi Axel,

I played a bit with CultureInfo this morning. IMO it's clearly a bug in
RangeValidator.

You can put the code in Page_Init or Page_Load, it won't work.

Const min_val As String = "2006. 01. 01."
Const max_val As String = "2006. 07. 13."

Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")
RangeValidator1.Type = ValidationDataType.Date

If RangeValidator1.CanConvert(min_val, ValidationDataType.Date) Then
RangeValidator1.MinimumValue = min_val
End If
If RangeValidator1.CanConvert(max_val, ValidationDataType.Date) Then
RangeValidator1.MaximumValue = max_val
End If

CanConvert is false and shows that such a date format cannot be converted for
Hungarian culture.
The same is true for lv-LV and lt-LT. These are the three ASP.NET cultures using
yyyy.MM.dd or yyyy. MM. dd. as ShortDateString.

If you set RangeValidator1.Type = ValidationDataType.String, then it works.
That was my solution "without error" yesterday, but it doesn't meet the necessity
to recognize input date formats like yyyy. m. d. as valid, because they are
compared as strings, not dates.

A date format convertible for "hu-HU" is yyyy-MM-dd.
Interestingly and unfortunately, although the CultureInfo("hu-HU") has yyyy. MM. dd.
as ShortDateFormat, the input date must then also be [yy]yy-[M]M-[d]d,
in the format of the min and max values!
Nevertheless, perhaps this might be a workaround for you.

Regards,
Frank
Hi Frank,

where are you setting this value? I'm setting it at Page_Init()

Value, in fact, is coming from DateTime.Now. I've set up a second page
setting DateTime.Now.ToShortDateString() - same error.

From the error message in my first posting one can see that the value
provided is correct. The stack trace shows that the error is somewhere deep
inside the RangeValidator control.

PLEEEASEE HEEEELP - anyone...

TIA,
Axel

-----------------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:es*************@TK2MSFTNGP05.phx.gbl...
Hi Axel,

Me once again. I've tested the following code in VB2003 .NET 1.1:

Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")

RangeValidator1.MaximumValue = DateTime.Now.ToShortDateString

without any errors.

RangeValidator1.MaximumValue then is '2006. 07. 11.'

There is one question I have about your code:
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
I can't figure out what value you have for value.ToShortDateString().
Can it be converted to a valid date string?
Would
set {rngDate.MaximumValue=DateTime.Now.ToShortDateStri ng();}
run without error?

Regards,
Frank

Well, I guess so,
>
the value is coming from .NET so it should be alright. It works for all
the
other languages we've implemented so far (e.g.: de, en, fr, nl, cz)...
>
This is the code:
>
public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <--- *****
}
>
TIA,
Axel
>
>
>
----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,

Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?

Regards,
Frank


Hi,
>
I'm working in a team developing an international website. When I
set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator
doesn't
seem
to be able to parse a TextBox's date value (Exception message see
below)
correctly.
>
The TextBox's value is coming from the
DateTime.Now.ToShortDateString()
function, so it's an original .NET value.
>
Can someone please help me out on this? I need to be able to get
this
application running until end of the week.
>
TIA,
Axel Dahmen
>
------------------------------
The value '2006. 07. 11.' of the MaximumValue property of 'rngDate'
cannot
be converted to type 'Date'.
>
Exception Details: System.Web.HttpException: The value '2006. 07.
11.'
of
the MaximumValue property of 'rngDate' cannot be converted to type
'Date'.
>
Stack Trace:
>
[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter
writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...
>
>
>
>

Jul 13 '06 #11

P: n/a
Hi Frank,

thanks a lot for trying to help! A colleague of mine just contacted MS.
There's a bug in .NET 1.1 and here's how to obtain a hotfix:
http://support.microsoft.com/kb/834330

TIA and best wishes,
Axel Dahmen

------------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uq**************@TK2MSFTNGP05.phx.gbl...
Hi Axel,

I played a bit with CultureInfo this morning. IMO it's clearly a bug in
RangeValidator.

You can put the code in Page_Init or Page_Load, it won't work.

Const min_val As String = "2006. 01. 01."
Const max_val As String = "2006. 07. 13."

Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")
RangeValidator1.Type = ValidationDataType.Date

If RangeValidator1.CanConvert(min_val, ValidationDataType.Date) Then
RangeValidator1.MinimumValue = min_val
End If
If RangeValidator1.CanConvert(max_val, ValidationDataType.Date) Then
RangeValidator1.MaximumValue = max_val
End If

CanConvert is false and shows that such a date format cannot be converted
for
Hungarian culture.
The same is true for lv-LV and lt-LT. These are the three ASP.NET cultures
using
yyyy.MM.dd or yyyy. MM. dd. as ShortDateString.

If you set RangeValidator1.Type = ValidationDataType.String, then it
works.
That was my solution "without error" yesterday, but it doesn't meet the
necessity
to recognize input date formats like yyyy. m. d. as valid, because they
are
compared as strings, not dates.

A date format convertible for "hu-HU" is yyyy-MM-dd.
Interestingly and unfortunately, although the CultureInfo("hu-HU") has
yyyy. MM. dd.
as ShortDateFormat, the input date must then also be [yy]yy-[M]M-[d]d,
in the format of the min and max values!
Nevertheless, perhaps this might be a workaround for you.

Regards,
Frank
Hi Frank,

where are you setting this value? I'm setting it at Page_Init()

Value, in fact, is coming from DateTime.Now. I've set up a second page
setting DateTime.Now.ToShortDateString() - same error.

From the error message in my first posting one can see that the value
provided is correct. The stack trace shows that the error is somewhere
deep
inside the RangeValidator control.

PLEEEASEE HEEEELP - anyone...

TIA,
Axel

-----------------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:es*************@TK2MSFTNGP05.phx.gbl...
Hi Axel,
>
Me once again. I've tested the following code in VB2003 .NET 1.1:
>
Thread.CurrentThread.CurrentCulture() = New CultureInfo("hu-HU")
>
RangeValidator1.MaximumValue = DateTime.Now.ToShortDateString
>
without any errors.
>
RangeValidator1.MaximumValue then is '2006. 07. 11.'
>
There is one question I have about your code:
>
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <---
*****
>
I can't figure out what value you have for value.ToShortDateString().
Can it be converted to a valid date string?
Would
set {rngDate.MaximumValue=DateTime.Now.ToShortDateStri ng();}
run without error?
>
Regards,
Frank
>
>
>
>
Well, I guess so,

the value is coming from .NET so it should be alright. It works for
all
the
other languages we've implemented so far (e.g.: de, en, fr, nl,
cz)...

This is the code:

public DateTime MaximumDate
{
get {return Convert.ToDateTime(rngDate.MaximumValue);}
set {rngDate.MaximumValue=value.ToShortDateString();} // <---
*****
}

TIA,
Axel



----------------
"Frank Lehmann" <f.******@chat4world.comwrote in message
news:uL**************@TK2MSFTNGP03.phx.gbl...
Hi Axel,
>
Are you sure your date of 2006.07.11 is allowed to have
spaces before month and day?
>
Regards,
Frank
>
>
Hi,

I'm working in a team developing an international website. When
I
set
the
page's CultureInfo to Hungarian (hu-HU) then the RangeValidator
doesn't
seem
to be able to parse a TextBox's date value (Exception message
see
below)
correctly.

The TextBox's value is coming from the
DateTime.Now.ToShortDateString()
function, so it's an original .NET value.

Can someone please help me out on this? I need to be able to get
this
application running until end of the week.

TIA,
Axel Dahmen

------------------------------
The value '2006. 07. 11.' of the MaximumValue property of
'rngDate'
cannot
be converted to type 'Date'.

Exception Details: System.Web.HttpException: The value '2006.
07.
11.'
of
the MaximumValue property of 'rngDate' cannot be converted to
type
'Date'.

Stack Trace:

[HttpException (0x80004005): The value '2006. 07. 11.' of the
MaximumValue
property of 'rngDate' cannot be converted to type 'Date'.]
System.Web.UI.WebControls.RangeValidator.ControlPr opertiesValid()
System.Web.UI.WebControls.BaseValidator.get_Proper tiesValid()
System.Web.UI.WebControls.BaseValidator.Render(Htm lTextWriter
writer)
System.Web.UI.Control.RenderControl(HtmlTextWriter writer)
System.Web.UI.Control.RenderChildren(HtmlTextWrite r writer)
System.Web.UI.Control.Render(HtmlTextWriter writer)
...



Jul 13 '06 #12

This discussion thread is closed

Replies have been disabled for this discussion.