开发者

Looking for a shortcut for specificying parameters in an ObectDataSource UpdateMethod

I a开发者_运维知识库m using an ObectDataSorce in my asp.net C# code, with SelectMethod() that calls a method that returns List< Employee>.

(I don't think it matters to the question, but I am displaying the data in the UI in an infragistics webdatagrid.)

I am working on UpdateMethod() now.

I tried using Employee employee as the input parameter to the method, as I used as the parameter in the SelectMethod(), but the compiler is looking for each property in Employee broken out as a separate parameter, i.e. String Fn, String Ln, String Address1 , etc.

Any there any shortcuts for doing this rather than creating the method with a whole long list of parameters? Or leaving out the parameters for stuff that was readonly?


You should set ObjectDataSource.DataObjectTypeName to Employee.

http://msdn.microsoft.com/en-us/library/system.web.ui.webcontrols.objectdatasource.dataobjecttypename.aspx

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜