search envelope-o feed check
Home Unanswered Active Tags New Question
user comment-o

How to change the <globalization> to en-gb

Asked by Drizzim
10 years ago.

I changed the globalization culture to united kingdom in order for the weekends to be on the right and the date come before the month. The only piece of code i changed was the piece below.

<globalization uiCulture="en-gb" culture="en-gb"/>

When i run the program and try to book a holiday,i get an arithmitic overflow error. Any ideas how to make this work ??

Comment posted by Bbq
10 years ago.
protected void EventDetail_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
e.NewValues["eventstart"] = Convert.ToDateTime(e.NewValues["eventstart"], new CultureInfo("en-GB"));
e.NewValues["eventend"] = Convert.ToDateTime(e.NewValues["eventend"], new CultureInfo("en-GB"));
}

Are you telling that did this not do the trick??
Comment posted by Anonymous
10 years ago.

The 3 pieces of code tht influence this are the following:

Web.config file -- <globalization uiCulture="en-GB" culture="en-GB"/>

Default.aspx.cs --

protected void EventDetail_ItemUpdating(object sender, DetailsViewUpdateEventArgs e)
{
e.NewValues["eventstart"] = Convert.ToDateTime(e.NewValues["eventstart"], new CultureInfo("en-GB"));
e.NewValues["eventend"] = Convert.ToDateTime(e.NewValues["eventend"], new CultureInfo("en-GB"));
}

Default.aspx --

<asp:DetailsView ID="EventDetail" runat="server" DefaultMode="Edit" OnItemUpdated="EventDetail_ItemUpdated"
DataSourceID="SqlDataSourceDetail" DataKeyNames="id"
AutoGenerateEditButton="True" OnItemCommand="EventDetail_ItemCommand"
Width="50px" AutoGenerateInsertButton="True" AutoGenerateRows="False" OnItemInserted="EventDetail_ItemInserted"
CssClass="detail" GridLines="None" OnItemUpdating="EventDetail_ItemUpdating">

The error i get is when i try and book an event is -- arithmitic overflow error converting expression to data type datetime.

Comment posted by Bbq
10 years ago.
Hmm...I'm kind of out of answer right now...maybe you should contact support at their email. :S

Bbq
Comment posted by Anonymous
10 years ago.

I still cannot figure out what I am doing wrong...

Is there any namespaces i need to include ??

Using ...;

Comment posted by Anonymous
10 years ago.
I found this website : http://msdn.microsoft.com/en-us/library/3xbc3357(VS.90).aspx
Maybe you indeed need a namespace for globalisation...I am really not sure at that point.
Let me know if something new comes up.

Bbq
Comment posted by drizzim
10 years ago.

my problem has something to do with the item_updating event or the modalpopup extender. When i run the application it shows the weekends as the last 2 days and monday as the first day. My problem is when i try and book a room it goes to a grey screen and shows a white box.

Comment posted by Bbq
10 years ago.
That's weird...maybe send a screenshot along with a further detailed explanation of the problem to support@daypilot.org will help.

Bbq
This question is more than 3 months old and has been closed. Please create a new question if you have anything to add.