user247458
user247458

Reputation: 23

objectDataSource updating - read only dictionary problem

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

Upvotes: 1

Views: 464

Answers (1)

josephj1989
josephj1989

Reputation: 9709

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

Try

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

that will work

Upvotes: 1

Related Questions