K
Kernel Bling
Hi Everyone,
This Saturday the stage was set. The problem simply could not go on
existing -- it had to be solved. Many hours, articles, compilations
and frustrations later I still did not find an answer. Even pacing
around my flat until I nearly went into an altered state of reality
proved futile.
So here is the problem...
When I link up the ObjectDataSource UpdateMethod to a method in the
TypeName class that takes individual parameters (using
'<UpdateParameters> ... </UpdateParameters>') all is well. Eg.
<asp:ObjectDataSource ID="ObjectDataSource1"
Runat="server"
EnableCaching="false"
TypeName="RecipeToolUI.MaterialComponent"
SelectMethod="GetMaterials"
UpdateMethod="UpdateMaterial"
OldValuesParameterFormatString="{0}"
<UpdateParameters>
<%-- just a lot of prameters --%>
</UpdateParameters>
</asp:ObjectDataSource>
When I try to link up a method that takes an object (using
DataObjectTypeName) instead of individual value types like this:
...
DataObjectTypeName='RecipeTool.Material'
...
I keep on getting this error:
"""
ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'UpdateMaterial' that takes parameters of type
'RecipeTool.Material'.
"""
Things I have tried (besides the pacing):
0. Using only VS 2005 to link things up.
1. Adding attributes to the UpdateMethod method in the
DataObjectTypeName class, as well as to the class itself.
This only resulted in VS seeing the method (in the ObjectDataSource
configuration wizard), but it does not solve the problem.
2. Tried various method signatures.
3. Deleted the Asp.Net temporary files.
4. Changed namespaces, method names, class names. This proved that
the compiler/runtime can find the class, but not the method.
Any suggestions or help will be greatly appreciated.
Regards.
This Saturday the stage was set. The problem simply could not go on
existing -- it had to be solved. Many hours, articles, compilations
and frustrations later I still did not find an answer. Even pacing
around my flat until I nearly went into an altered state of reality
proved futile.
So here is the problem...
When I link up the ObjectDataSource UpdateMethod to a method in the
TypeName class that takes individual parameters (using
'<UpdateParameters> ... </UpdateParameters>') all is well. Eg.
<asp:ObjectDataSource ID="ObjectDataSource1"
Runat="server"
EnableCaching="false"
TypeName="RecipeToolUI.MaterialComponent"
SelectMethod="GetMaterials"
UpdateMethod="UpdateMaterial"
OldValuesParameterFormatString="{0}"
<UpdateParameters>
<%-- just a lot of prameters --%>
</UpdateParameters>
</asp:ObjectDataSource>
When I try to link up a method that takes an object (using
DataObjectTypeName) instead of individual value types like this:
...
DataObjectTypeName='RecipeTool.Material'
...
I keep on getting this error:
"""
ObjectDataSource 'ObjectDataSource1' could not find a non-generic
method 'UpdateMaterial' that takes parameters of type
'RecipeTool.Material'.
"""
Things I have tried (besides the pacing):
0. Using only VS 2005 to link things up.
1. Adding attributes to the UpdateMethod method in the
DataObjectTypeName class, as well as to the class itself.
This only resulted in VS seeing the method (in the ObjectDataSource
configuration wizard), but it does not solve the problem.
2. Tried various method signatures.
3. Deleted the Asp.Net temporary files.
4. Changed namespaces, method names, class names. This proved that
the compiler/runtime can find the class, but not the method.
Any suggestions or help will be greatly appreciated.
Regards.