开发者

objectDataSource updating - read only dictionary problem

开发者 https://www.devze.com 2023-01-04 01:32 出处:网络
protected void objUpdating(object sender, ObjectDataSourceMethodEventArgs e) { e.InputParameters.Add(\"update_name\", \"xxx\");
protected void objUpdating(object sender, ObjectDataSourceMethodEventArgs e)
{
    e.InputParameters.Add("update_name", "xxx");            
 }

开发者_开发问答Hi, I am trying to make Update method for ObjectDataSource, which has argument "update_name" but adding parameter to collection using add method throws an exception of dictionary ( key value ) is read only any thougths? thank you


You cannot use Add method as ObjectDataSource has already added a parameter to the collection.

Try

e.InputParameters["update_name"]= "xxx";

that will work

0

精彩评论

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