Important Notice: Our web hosting provider recently started charging us for additional visits, which was unexpected. In response, we're seeking donations. Depending on the situation, we may explore different monetization options for our Community and Expert Contributors. It's crucial to provide more returns for their expertise and offer more Expert Validated Answers or AI Validated Answers. Learn more about our hosting issue here.

How do I update the primary key in an ObjectDataSource control when it is used with the GridView control?

0
Posted

How do I update the primary key in an ObjectDataSource control when it is used with the GridView control?

0

[top] If you need to update the primary key in the Business Logic Layer (BLL), you must specify the DataKeyNames property in the GridView control and the OldValuesParameterFormatString property in the ObjectDataSource control. For example: The signature of the update method in the Business Logic Layer is: [System.ComponentModel.DataObjectMethod(System.ComponentModel.DataObjectMethodType.Update, true)] public void UpdateDec(int original_id, int id, decimal value) 1.

Related Questions

What is your question?

*Sadly, we had to bring back ads too. Hopefully more targeted.

Experts123