Actually I made a data acces layer class, buiness logic layer class & presentation layer(page). In most of the books generally direct update query is written on aspx page under sql data source using update commnad property & do updation in grid view. Now i do not want to use update command or connection string in sql data source.This thing I have done in data acces layer class where I make a method of an update.Recently I was tasked with encrypting/decrypting some data that could be edited using ASP. Along with the details view control, the legacy code used a SQL Data Source to select and update everything.This means the data access layer was bypassed completely, so any business logic that dealt with encryption on this page had to use a different execution path. The problem could be divided into two tasks: The first task was the easier of the two, as it just involved referencing the encryption library from the code behind page and calling the function inline in the aspx page.If I want to access the method in which we define update query, how can I access that method on aspx page & update the data in a grid view without direct use of an query on aspx page under sql data source?
You could cache the object that you are going to use as a data source too.After setting the Details View’s Item Updating method, you will need to modify the SQL Data Source’s Update Command, Update Command Type, and Update Parameters.The legacy code in the SQL data source used a update statement with parameters.I want to use this method so I can do an update in grid view directly. Grid Views can bind to Data Tables, Data Views, Arrays of Objects ..more.I've never actually used the Sql Data Source before. So, you need to populate the object that you are going to use as your data source at some point in your page life cycle.