Hi All,
I have a gridview and sql datasource and i made the gridview editable via using and SQl datasource.
So when i am configuring the sql datasource i need to provide the sql table i want to load and update. Like below code would be generated on aspx form as update command.
UpdateCommand=
"UPDATE [Products] SET [ProductName] = @ProductName,
[UnitPrice] = @UnitPrice, [Discontinued] = @Discontinued
WHERE [ProductID] = @ProductID">
What I have tried:
So my concern is, my table name i want to display and update will change dynamically. So this implicit way is not proper. So the table name should given dynamically and update command should be generated for the same. So can anyone help me to find the better way of updating an entire row of gridview if i am not sure about the table name and fields?
Table name i can pass through a variable but while writing update command how can i supply fields?
anyone got my concern?