473,378 Members | 1,162 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,378 software developers and data experts.

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

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
11 2146
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
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
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
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
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
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
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
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
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
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
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

5
by: charliewest | last post by:
I've configured a RangeValidator control on a WebForm, using ASP.NET, and have set the type to string, the max value to 100, and min value to 1, however, the control to validate always throws an...
1
by: tcb | last post by:
I have a RangeValidator setup for two input fields. The validator Type is set to Integer. If the user enters an alpha numeric, the validator works, however, if the user enters a space, the validator...
6
by: jk | last post by:
Looking through WebUIValidation.js, I discovered that the standard validators don't cater for non-numeric date formats (e.g. dd-MMM-yyyy) which I would like to do To keep code to a minimum, I...
0
by: Arpicheck | last post by:
Hi, I am writing a page that contains a texbox, a calendar, and a rangevalidator. The range validator is testing the textbox for date values. There is an event, set up to fire, when the...
1
by: COHENMARVIN | last post by:
I'm trying to get a rangevalidator to work. Normally this is easy, but here I'm trying to make the rangevalidator check a range that is from variables. Here is the code. Its simple, but it...
4
by: jpabich | last post by:
I have a range validator on my field to make sure it is a double. No matter what I put in the field, it always comes back false. Why? <asp:rangevalidator id="valgMessageMin" runat="server"...
0
by: Andrew Han | last post by:
I have a simple textbox where a user can enter a numeric value. The RangeValidator works perfectly well to determine if the value is a number of whatever type I specify AND to determine if the...
1
by: Cirene | last post by:
I have a rangevalidator as follows... <asp:RangeValidator ID="RangeValidator4" runat="server" ControlToValidate="InvoicePriceTextBox" ErrorMessage="0-999999" MaximumValue="999999"...
2
by: SvenV | last post by:
Hello, I'm looking for a way to set the timezone on a mobile (windows CE4.0). I know there is no specific function in .NET1.1 and by looking on pinvoke.net: HomePage (misc) between coredll I...
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.