Insert method in ASP.NET

How an insert method of the sqldata source control works in asp .net

  
Showing Answers 1 - 3 of 3 Answers

The SQLDataSource methods such as Insert method is associated with ad Hoc SQL queries or stored procedures.

When SQLDataSource is invoked via Web control:
- A database connection is established,
- OnInserting method is called.
- DbCommand object is built using the InsertCommand text and InsertParameters properties,
- DbCommand object is executed against the underlying connected database.
- OnInserted method is called to raise the Inserted event.

As a precautionary measure, You need to use Filtering event and validate the insert parameter values before executing the insert query.

  Was this answer useful?  Yes

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

 

Related Answered Questions

 

Related Open Questions