473,573 Members | 3,113 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

ObjectDataSourc e DateTime isuue with en-gb culture

Hi,

I have an british ASP.Net 2.0 application which is doing what (should) be
very simple. But I am having issues.

On my page I have a GridView as follows (some tags excluded for easy reading):

<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
DataSourceID="O bjectDataSource 1" DataKeyNames="I d"
OnRowUpdated="G ridView1_RowUpd ated">
<Columns>
<asp:BoundFie ld DataField="Crea teDate" HeaderText="Cre ate Date"
SortExpression= "CreateDate "
DataFormatStrin g="{0:d}" ApplyFormatInEd itMode="True"
ReadOnly="True" HtmlEncode="Fal se">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:CommandFie ld ButtonType="Ima ge"
CancelImageUrl= "~/images/manager/false.gif"
EditImageUrl="~/images/manager/edit.gif"
ShowEditButton= "True" UpdateImageUrl= "~/images/manager/true.gif" />
</Columns>
</asp:GridView>

This is bound to an ObjectDataSourc e defined as follows:

<asp:ObjectData Source ID="ObjectDataS ource1" runat="server"
SelectMethod="G etCampaigns"
TypeName="B3.Ma iler.BusinessEn tities.Campaign "
DataObjectTypeN ame="B3.Mailer. BusinessEntitie s.Campaign"
InsertMethod="I nsert" UpdateMethod="U pdate">
<SelectParamete rs>
<asp:SessionPar ameter Name="clientId" SessionField="C lientId"
Type="Int32" />
</SelectParameter s>
</asp:ObjectDataS ource>

The update method is defined as:

public static void Update(Campaign campaign)
{
}

However, when I edit a row in the GridView and press the update button I get
the following error:

[InvalidOperatio nException: Cannot convert value of parameter 'CreateDate'
from 'System.String' to 'System.DateTim e']
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ConvertType(O bject value,
Type type, String paramName) +485
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildObjectVa lue(Object
value, Type destinationType , String paramName) +217
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildDataObje ct(Type
dataObjectType, IDictionary inputParameters ) +548
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteUpdate (IDictionary
keys, IDictionary values, IDictionary oldValues) +1520
System.Web.UI.D ataSourceView.U pdate(IDictiona ry keys, IDictionary values,
IDictionary oldValues, DataSourceViewO perationCallbac k callback) +179
System.Web.UI.W ebControls.Grid View.HandleUpda te(GridViewRow row, Int32
rowIndex, Boolean causesValidatio n) +1137
System.Web.UI.W ebControls.Grid View.HandleEven t(EventArgs e, Boolean
causesValidatio n, String validationGroup ) +835
System.Web.UI.W ebControls.Grid View.OnBubbleEv ent(Object source, EventArgs
e) +162
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Grid ViewRow.OnBubbl eEvent(Object source,
EventArgs e) +118
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Imag eButton.OnComma nd(CommandEvent Args e) +106
System.Web.UI.W ebControls.Imag eButton.RaisePo stBackEvent(Str ing
eventArgument) +200

System.Web.UI.W ebControls.Imag eButton.System. Web.UI.IPostBac kEventHandler.R aisePostBackEve nt(String eventArgument) +31
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +72
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +3840

This appears to be caused by the date being in UK format (dd/mm/yyyy - which
is correct for this application) as dates which could also be in US format
(i.e. 12/12/2005) do not throw this error.

Both my browser and development machine are set to en-gb but there is no
Culture attribute set on the @Page tags on the page.

Is this a bug in the ObjectDataSourc e not conforming to globalization or am
I missing somthing?

Any help you can give will be much appreciated. Thanks in advance for your
help.

Regards,

Anne.

Dec 14 '05 #1
4 8478
Hi Anne,

How do you define the "CreateDate " within the
"B3.Mailer.Busi nessEntities.Ca mpaign" class?
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:
Hi,

I have an british ASP.Net 2.0 application which is doing what (should) be
very simple. But I am having issues.

On my page I have a GridView as follows (some tags excluded for easy reading):

<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
DataSourceID="O bjectDataSource 1" DataKeyNames="I d"
OnRowUpdated="G ridView1_RowUpd ated">
<Columns>
<asp:BoundFie ld DataField="Crea teDate" HeaderText="Cre ate Date"
SortExpression= "CreateDate "
DataFormatStrin g="{0:d}" ApplyFormatInEd itMode="True"
ReadOnly="True" HtmlEncode="Fal se">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:CommandFie ld ButtonType="Ima ge"
CancelImageUrl= "~/images/manager/false.gif"
EditImageUrl="~/images/manager/edit.gif"
ShowEditButton= "True" UpdateImageUrl= "~/images/manager/true.gif" />
</Columns>
</asp:GridView>

This is bound to an ObjectDataSourc e defined as follows:

<asp:ObjectData Source ID="ObjectDataS ource1" runat="server"
SelectMethod="G etCampaigns"
TypeName="B3.Ma iler.BusinessEn tities.Campaign "
DataObjectTypeN ame="B3.Mailer. BusinessEntitie s.Campaign"
InsertMethod="I nsert" UpdateMethod="U pdate">
<SelectParamete rs>
<asp:SessionPar ameter Name="clientId" SessionField="C lientId"
Type="Int32" />
</SelectParameter s>
</asp:ObjectDataS ource>

The update method is defined as:

public static void Update(Campaign campaign)
{
}

However, when I edit a row in the GridView and press the update button I get
the following error:

[InvalidOperatio nException: Cannot convert value of parameter 'CreateDate'
from 'System.String' to 'System.DateTim e']
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ConvertType(O bject value,
Type type, String paramName) +485
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildObjectVa lue(Object
value, Type destinationType , String paramName) +217
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildDataObje ct(Type
dataObjectType, IDictionary inputParameters ) +548
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteUpdate (IDictionary
keys, IDictionary values, IDictionary oldValues) +1520
System.Web.UI.D ataSourceView.U pdate(IDictiona ry keys, IDictionary values,
IDictionary oldValues, DataSourceViewO perationCallbac k callback) +179
System.Web.UI.W ebControls.Grid View.HandleUpda te(GridViewRow row, Int32
rowIndex, Boolean causesValidatio n) +1137
System.Web.UI.W ebControls.Grid View.HandleEven t(EventArgs e, Boolean
causesValidatio n, String validationGroup ) +835
System.Web.UI.W ebControls.Grid View.OnBubbleEv ent(Object source, EventArgs
e) +162
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Grid ViewRow.OnBubbl eEvent(Object source,
EventArgs e) +118
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Imag eButton.OnComma nd(CommandEvent Args e) +106
System.Web.UI.W ebControls.Imag eButton.RaisePo stBackEvent(Str ing
eventArgument) +200

System.Web.UI.W ebControls.Imag eButton.System. Web.UI.IPostBac kEventHandler.R aisePostBackEve nt(String eventArgument) +31
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +72
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +3840

This appears to be caused by the date being in UK format (dd/mm/yyyy - which
is correct for this application) as dates which could also be in US format
(i.e. 12/12/2005) do not throw this error.

Both my browser and development machine are set to en-gb but there is no
Culture attribute set on the @Page tags on the page.

Is this a bug in the ObjectDataSourc e not conforming to globalization or am
I missing somthing?

Any help you can give will be much appreciated. Thanks in advance for your
help.

Regards,

Anne.

Dec 14 '05 #2
Hi,

It's a simple private field with public accessors:

private DateTime _CreateDate;

public DateTime CreateDate
{
get { return _CreateDate; }
set { _CreateDate = value; }
}

Any ideas?

Thanks,

Anne.
"Phillip Williams" wrote:
Hi Anne,

How do you define the "CreateDate " within the
"B3.Mailer.Busi nessEntities.Ca mpaign" class?
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:
Hi,

I have an british ASP.Net 2.0 application which is doing what (should) be
very simple. But I am having issues.

On my page I have a GridView as follows (some tags excluded for easy reading):

<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
DataSourceID="O bjectDataSource 1" DataKeyNames="I d"
OnRowUpdated="G ridView1_RowUpd ated">
<Columns>
<asp:BoundFie ld DataField="Crea teDate" HeaderText="Cre ate Date"
SortExpression= "CreateDate "
DataFormatStrin g="{0:d}" ApplyFormatInEd itMode="True"
ReadOnly="True" HtmlEncode="Fal se">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:CommandFie ld ButtonType="Ima ge"
CancelImageUrl= "~/images/manager/false.gif"
EditImageUrl="~/images/manager/edit.gif"
ShowEditButton= "True" UpdateImageUrl= "~/images/manager/true.gif" />
</Columns>
</asp:GridView>

This is bound to an ObjectDataSourc e defined as follows:

<asp:ObjectData Source ID="ObjectDataS ource1" runat="server"
SelectMethod="G etCampaigns"
TypeName="B3.Ma iler.BusinessEn tities.Campaign "
DataObjectTypeN ame="B3.Mailer. BusinessEntitie s.Campaign"
InsertMethod="I nsert" UpdateMethod="U pdate">
<SelectParamete rs>
<asp:SessionPar ameter Name="clientId" SessionField="C lientId"
Type="Int32" />
</SelectParameter s>
</asp:ObjectDataS ource>

The update method is defined as:

public static void Update(Campaign campaign)
{
}

However, when I edit a row in the GridView and press the update button I get
the following error:

[InvalidOperatio nException: Cannot convert value of parameter 'CreateDate'
from 'System.String' to 'System.DateTim e']
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ConvertType(O bject value,
Type type, String paramName) +485
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildObjectVa lue(Object
value, Type destinationType , String paramName) +217
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildDataObje ct(Type
dataObjectType, IDictionary inputParameters ) +548
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteUpdate (IDictionary
keys, IDictionary values, IDictionary oldValues) +1520
System.Web.UI.D ataSourceView.U pdate(IDictiona ry keys, IDictionary values,
IDictionary oldValues, DataSourceViewO perationCallbac k callback) +179
System.Web.UI.W ebControls.Grid View.HandleUpda te(GridViewRow row, Int32
rowIndex, Boolean causesValidatio n) +1137
System.Web.UI.W ebControls.Grid View.HandleEven t(EventArgs e, Boolean
causesValidatio n, String validationGroup ) +835
System.Web.UI.W ebControls.Grid View.OnBubbleEv ent(Object source, EventArgs
e) +162
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Grid ViewRow.OnBubbl eEvent(Object source,
EventArgs e) +118
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Imag eButton.OnComma nd(CommandEvent Args e) +106
System.Web.UI.W ebControls.Imag eButton.RaisePo stBackEvent(Str ing
eventArgument) +200

System.Web.UI.W ebControls.Imag eButton.System. Web.UI.IPostBac kEventHandler.R aisePostBackEve nt(String eventArgument) +31
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +72
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +3840

This appears to be caused by the date being in UK format (dd/mm/yyyy - which
is correct for this application) as dates which could also be in US format
(i.e. 12/12/2005) do not throw this error.

Both my browser and development machine are set to en-gb but there is no
Culture attribute set on the @Page tags on the page.

Is this a bug in the ObjectDataSourc e not conforming to globalization or am
I missing somthing?

Any help you can give will be much appreciated. Thanks in advance for your
help.

Regards,

Anne.

Dec 14 '05 #3
Hi Anne,

If I build a web page that allows the user’s browser to determine the
display of the date, yet my database operates on a server using the culture
setting for en-us, then I would get the error that you got as in this demo:
http://www.webswapp.com/CodeSamples/..._2c_error.aspx

If I add an UpdateParameter s section within my objectDataSourc e defintion to
explicitly cast the edited values to their appropriate date type, I do not
get that error as in this demo:
http://www.webswapp.com/CodeSamples/...idView_2c.aspx

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:
Hi,

It's a simple private field with public accessors:

private DateTime _CreateDate;

public DateTime CreateDate
{
get { return _CreateDate; }
set { _CreateDate = value; }
}

Any ideas?

Thanks,

Anne.
"Phillip Williams" wrote:
Hi Anne,

How do you define the "CreateDate " within the
"B3.Mailer.Busi nessEntities.Ca mpaign" class?
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:
Hi,

I have an british ASP.Net 2.0 application which is doing what (should) be
very simple. But I am having issues.

On my page I have a GridView as follows (some tags excluded for easy reading):

<asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
DataSourceID="O bjectDataSource 1" DataKeyNames="I d"
OnRowUpdated="G ridView1_RowUpd ated">
<Columns>
<asp:BoundFie ld DataField="Crea teDate" HeaderText="Cre ate Date"
SortExpression= "CreateDate "
DataFormatStrin g="{0:d}" ApplyFormatInEd itMode="True"
ReadOnly="True" HtmlEncode="Fal se">
<HeaderStyle Wrap="False" />
</asp:BoundField>
<asp:CommandFie ld ButtonType="Ima ge"
CancelImageUrl= "~/images/manager/false.gif"
EditImageUrl="~/images/manager/edit.gif"
ShowEditButton= "True" UpdateImageUrl= "~/images/manager/true.gif" />
</Columns>
</asp:GridView>

This is bound to an ObjectDataSourc e defined as follows:

<asp:ObjectData Source ID="ObjectDataS ource1" runat="server"
SelectMethod="G etCampaigns"
TypeName="B3.Ma iler.BusinessEn tities.Campaign "
DataObjectTypeN ame="B3.Mailer. BusinessEntitie s.Campaign"
InsertMethod="I nsert" UpdateMethod="U pdate">
<SelectParamete rs>
<asp:SessionPar ameter Name="clientId" SessionField="C lientId"
Type="Int32" />
</SelectParameter s>
</asp:ObjectDataS ource>

The update method is defined as:

public static void Update(Campaign campaign)
{
}

However, when I edit a row in the GridView and press the update button I get
the following error:

[InvalidOperatio nException: Cannot convert value of parameter 'CreateDate'
from 'System.String' to 'System.DateTim e']
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ConvertType(O bject value,
Type type, String paramName) +485
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildObjectVa lue(Object
value, Type destinationType , String paramName) +217
System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildDataObje ct(Type
dataObjectType, IDictionary inputParameters ) +548
System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteUpdate (IDictionary
keys, IDictionary values, IDictionary oldValues) +1520
System.Web.UI.D ataSourceView.U pdate(IDictiona ry keys, IDictionary values,
IDictionary oldValues, DataSourceViewO perationCallbac k callback) +179
System.Web.UI.W ebControls.Grid View.HandleUpda te(GridViewRow row, Int32
rowIndex, Boolean causesValidatio n) +1137
System.Web.UI.W ebControls.Grid View.HandleEven t(EventArgs e, Boolean
causesValidatio n, String validationGroup ) +835
System.Web.UI.W ebControls.Grid View.OnBubbleEv ent(Object source, EventArgs
e) +162
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Grid ViewRow.OnBubbl eEvent(Object source,
EventArgs e) +118
System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
System.Web.UI.W ebControls.Imag eButton.OnComma nd(CommandEvent Args e) +106
System.Web.UI.W ebControls.Imag eButton.RaisePo stBackEvent(Str ing
eventArgument) +200

System.Web.UI.W ebControls.Imag eButton.System. Web.UI.IPostBac kEventHandler.R aisePostBackEve nt(String eventArgument) +31
System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
sourceControl, String eventArgument) +32
System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +72
System.Web.UI.P age.ProcessRequ estMain(Boolean
includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +3840

This appears to be caused by the date being in UK format (dd/mm/yyyy - which
is correct for this application) as dates which could also be in US format
(i.e. 12/12/2005) do not throw this error.

Both my browser and development machine are set to en-gb but there is no
Culture attribute set on the @Page tags on the page.

Is this a bug in the ObjectDataSourc e not conforming to globalization or am
I missing somthing?

Any help you can give will be much appreciated. Thanks in advance for your
help.

Regards,

Anne.

Dec 15 '05 #4
Hi Philip,

Your a geneous! Thanks, that works great!

I wish the MSDN documentation actually mentioned this!

Thanks again,

Anne.

"Phillip Williams" wrote:
Hi Anne,

If I build a web page that allows the user’s browser to determine the
display of the date, yet my database operates on a server using the culture
setting for en-us, then I would get the error that you got as in this demo:
http://www.webswapp.com/CodeSamples/..._2c_error.aspx

If I add an UpdateParameter s section within my objectDataSourc e defintion to
explicitly cast the edited values to their appropriate date type, I do not
get that error as in this demo:
http://www.webswapp.com/CodeSamples/...idView_2c.aspx

--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:
Hi,

It's a simple private field with public accessors:

private DateTime _CreateDate;

public DateTime CreateDate
{
get { return _CreateDate; }
set { _CreateDate = value; }
}

Any ideas?

Thanks,

Anne.
"Phillip Williams" wrote:
Hi Anne,

How do you define the "CreateDate " within the
"B3.Mailer.Busi nessEntities.Ca mpaign" class?
--
HTH,
Phillip Williams
http://www.societopia.net
http://www.webswapp.com
"Anne Catterick" wrote:

> Hi,
>
> I have an british ASP.Net 2.0 application which is doing what (should) be
> very simple. But I am having issues.
>
> On my page I have a GridView as follows (some tags excluded for easy reading):
>
> <asp:GridView ID="GridView1" runat="server" AutoGenerateCol umns="False"
> DataSourceID="O bjectDataSource 1" DataKeyNames="I d"
> OnRowUpdated="G ridView1_RowUpd ated">
> <Columns>
> <asp:BoundFie ld DataField="Crea teDate" HeaderText="Cre ate Date"
> SortExpression= "CreateDate "
> DataFormatStrin g="{0:d}" ApplyFormatInEd itMode="True"
> ReadOnly="True" HtmlEncode="Fal se">
> <HeaderStyle Wrap="False" />
> </asp:BoundField>
> <asp:CommandFie ld ButtonType="Ima ge"
> CancelImageUrl= "~/images/manager/false.gif"
> EditImageUrl="~/images/manager/edit.gif"
> ShowEditButton= "True" UpdateImageUrl= "~/images/manager/true.gif" />
> </Columns>
> </asp:GridView>
>
> This is bound to an ObjectDataSourc e defined as follows:
>
> <asp:ObjectData Source ID="ObjectDataS ource1" runat="server"
> SelectMethod="G etCampaigns"
> TypeName="B3.Ma iler.BusinessEn tities.Campaign "
> DataObjectTypeN ame="B3.Mailer. BusinessEntitie s.Campaign"
> InsertMethod="I nsert" UpdateMethod="U pdate">
> <SelectParamete rs>
> <asp:SessionPar ameter Name="clientId" SessionField="C lientId"
> Type="Int32" />
> </SelectParameter s>
> </asp:ObjectDataS ource>
>
> The update method is defined as:
>
> public static void Update(Campaign campaign)
> {
> }
>
> However, when I edit a row in the GridView and press the update button I get
> the following error:
>
> [InvalidOperatio nException: Cannot convert value of parameter 'CreateDate'
> from 'System.String' to 'System.DateTim e']
> System.Web.UI.W ebControls.Obje ctDataSourceVie w.ConvertType(O bject value,
> Type type, String paramName) +485
> System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildObjectVa lue(Object
> value, Type destinationType , String paramName) +217
> System.Web.UI.W ebControls.Obje ctDataSourceVie w.BuildDataObje ct(Type
> dataObjectType, IDictionary inputParameters ) +548
> System.Web.UI.W ebControls.Obje ctDataSourceVie w.ExecuteUpdate (IDictionary
> keys, IDictionary values, IDictionary oldValues) +1520
> System.Web.UI.D ataSourceView.U pdate(IDictiona ry keys, IDictionary values,
> IDictionary oldValues, DataSourceViewO perationCallbac k callback) +179
> System.Web.UI.W ebControls.Grid View.HandleUpda te(GridViewRow row, Int32
> rowIndex, Boolean causesValidatio n) +1137
> System.Web.UI.W ebControls.Grid View.HandleEven t(EventArgs e, Boolean
> causesValidatio n, String validationGroup ) +835
> System.Web.UI.W ebControls.Grid View.OnBubbleEv ent(Object source, EventArgs
> e) +162
> System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
> System.Web.UI.W ebControls.Grid ViewRow.OnBubbl eEvent(Object source,
> EventArgs e) +118
> System.Web.UI.C ontrol.RaiseBub bleEvent(Object source, EventArgs args) +56
> System.Web.UI.W ebControls.Imag eButton.OnComma nd(CommandEvent Args e) +106
> System.Web.UI.W ebControls.Imag eButton.RaisePo stBackEvent(Str ing
> eventArgument) +200
>
> System.Web.UI.W ebControls.Imag eButton.System. Web.UI.IPostBac kEventHandler.R aisePostBackEve nt(String eventArgument) +31
> System.Web.UI.P age.RaisePostBa ckEvent(IPostBa ckEventHandler
> sourceControl, String eventArgument) +32
> System.Web.UI.P age.RaisePostBa ckEvent(NameVal ueCollection postData) +72
> System.Web.UI.P age.ProcessRequ estMain(Boolean
> includeStagesBe foreAsyncPoint, Boolean includeStagesAf terAsyncPoint) +3840
>
> This appears to be caused by the date being in UK format (dd/mm/yyyy - which
> is correct for this application) as dates which could also be in US format
> (i.e. 12/12/2005) do not throw this error.
>
> Both my browser and development machine are set to en-gb but there is no
> Culture attribute set on the @Page tags on the page.
>
> Is this a bug in the ObjectDataSourc e not conforming to globalization or am
> I missing somthing?
>
> Any help you can give will be much appreciated. Thanks in advance for your
> help.
>
> Regards,
>
> Anne.
>

Dec 15 '05 #5

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

12
8680
by: Jim Hammond | last post by:
I am passing the whole object instead or parameters in my select and update methods. I can get the updated object if I set UpdateMethod, let ASP.NET autogenerate an update button, and then press update after making changes, but I don't want that update button. How can I get the updated object when the user presses one of my other action...
3
2411
by: CWWong | last post by:
I am using DetailsView using ObjectDataSource with DataSourceTypeName assigned to the specific class. SelectMethod, UpdateMethod and DeleteMethod is working successfully, except InsertMethod. The error msg returned is: Cannot insert the employee. With tracing trigger on, I had discovered that the parameter is actually empty. The data...
1
3852
by: John_H | last post by:
Re: ASP.NET 2.0 I would like suggestions or code examples on how to collect a variable length list of input data (item# & item quantity specifically). I thought that I could accomplish this using a GridView that has ViewState enabled, an ObjectDataSource to process the submitted list, textboxes for getting new item data and an add button. ...
2
1821
by: Dick | last post by:
How do I get to an ObjectDataSource's underlying data/schema. I thought it would have a DataSet property but I can't find it. So how do you find out about the data and/or the schema used to populate a bound control such as the GridView? Specifically I want to do something like this... For Each BoundControl in GridView1 If the DataType of...
7
3439
by: Dabbler | last post by:
I'm using an ObjectDataSource with a stored procedure and am getting the following error when trying to update (ExecuteNonQuery): System.Data.SqlClient.SqlException: Procedure or Function 'UpdateRegistrant' expects parameter '@EMail', which was not supplied. The field value was null in the database and not changed in the FormView so is...
0
1179
by: AlanJSmith | last post by:
I have a a strongly typed dataset created by VS2005 and am referencing it from an objectDataSource. i am using the the objectDataSource in a FormView control. The update fails so I trace the sql and find this : @DateOfBirth=''1951-10-17 00:00:00:000'' this is failing because of the double single quotes and works ok in profiler
10
4558
by: J055 | last post by:
Hi I've been trying out SqlCacheDependency using the ObjectDataSource and SQL Server 2005. It all works quite well with the minimum of configuration, e.g. <asp:ObjectDataSource ID="odsAccounts" runat="server" ... EnableCaching="true" SqlCacheDependency="CommandNotification"> .... </asp:ObjectDataSource>
0
1628
by: =?Utf-8?B?RGVuaXMgU29oZXQ=?= | last post by:
Hi all, I've created a new project to test ObjectDataSource component. I've just added a new objectdatasource, configured it (linked to a table) etc ... It works fine on localhost, i can create, retrieve, update and delete data.
3
1294
by: Tides | last post by:
My new page just won't fire the Update, Insert or Delete function on the BLL. I'm newish to ASP.NET and this may be a simple thing I have forgotten, but its driving me up the wall. I have other pages that work fine for this functionality. Here is the ObjectDataSource: <asp:ObjectDataSource ID="StaffDetailsDataSource" runat="server"...
3
4351
by: semomaniz | last post by:
I have a ajax reorderlist that displays the contents with out any problems but when i drag and reorder the list nothing happens, i get a postback and the same initial list is displayed, seems like my update method is not working or being called. I have read through multiple articles that states that all the parameters needs to be passed in if...
0
7778
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, well explore What is ONU, What Is Router, ONU & Routers main...
0
8201
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
0
8063
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
6413
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development projectplanning, coding, testing, and deploymentwithout human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
1
5585
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupr who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes...
0
5290
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one. At the time of converting from word file to html my equations which are in the word document file was convert...
0
3731
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3731
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
0
1039
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

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.