R
Rasmus
I have a simple LiveView control that databinds to a LinqDataSource that maps
to a table like this:
CREATE TABLE MyTable
(Id int NOT NULL,
Name nvarchar(50) NULL,
Picture image NULL)
The OR mapper class (made in the VS 2008 designer) has a property of type
System.Data.Linq.Binary
When editing (and clicking update) a row in the listview i get this error:
"Failed to set one or more properties on type MyTable. Ensure that the
input values are valid and can be converted to the corresponding property
types. "
Inspecting inner execptions i see:
"Cannot convert value of parameter 'Picture' from 'System.String' to
'System.Data.Linq.Binary'."
Looking more into the ListViewUpdateEventArgs on the protected void
ListView1_ItemUpdating(object sender, ListViewUpdateEventArgs e) method i
notice:
Picture
e.NewValues["Picture"] {"AAAAAAAA=="} object{System.Data.Linq.Binary}
e.OldValues["Picture"] "\"AAAAAAAA==\"" object {string}
Can you make this work?
to a table like this:
CREATE TABLE MyTable
(Id int NOT NULL,
Name nvarchar(50) NULL,
Picture image NULL)
The OR mapper class (made in the VS 2008 designer) has a property of type
System.Data.Linq.Binary
When editing (and clicking update) a row in the listview i get this error:
"Failed to set one or more properties on type MyTable. Ensure that the
input values are valid and can be converted to the corresponding property
types. "
Inspecting inner execptions i see:
"Cannot convert value of parameter 'Picture' from 'System.String' to
'System.Data.Linq.Binary'."
Looking more into the ListViewUpdateEventArgs on the protected void
ListView1_ItemUpdating(object sender, ListViewUpdateEventArgs e) method i
notice:
Picture
e.NewValues["Picture"] {"AAAAAAAA=="} object{System.Data.Linq.Binary}
e.OldValues["Picture"] "\"AAAAAAAA==\"" object {string}
Can you make this work?