Save data to a database in C#?
-
Friday, July 27, 2012 1:57 AMHow do I save data to a database fom a ASPX page?
All Replies
-
Friday, July 27, 2012 5:34 AM
Using ADO.net you can save data to database. To know more about ADO.net Refer: http://msdn.microsoft.com/en-us/library/h43ks021
If you have your Database ready, it is simple, Just drag a SQL Data Source Component from TOOL box and configure it . A good example is shown here: http://www.asp.net/web-forms/tutorials/data-access/accessing-the-database-directly-from-an-aspnet-page/inserting-updating-and-deleting-data-with-the-sqldatasource-vb
Another option is to use SQL Adopter which provides a Connection Object, Command Object and a Dataset. You can play with it to I/U/D/Select data.
http://support.microsoft.com/kb/308507
http://www.emmet-gray.com/Articles/SavingDataADO.htm
If You work with .net 4.0 Entity Framework i would recomend you to go with Entity Framework too.
Lingaraj Mishra
- Proposed As Answer by Mike FengMicrosoft Contingent Staff, Moderator Tuesday, July 31, 2012 10:23 AM
- Marked As Answer by Mike FengMicrosoft Contingent Staff, Moderator Thursday, August 09, 2012 2:27 PM
-
Thursday, August 02, 2012 10:52 AM
Hi Tony,
To add more another preferred option would be using Enterprise Library Data Access Application Block. Please visit the below link for more info.
http://msdn.microsoft.com/en-us/library/ff664408(v=pandp.50)
-Mohammed Ghouse Ibne Barq Kadapavi
http://www.ProgrammersVision.blogspot.com
https://sites.google.com/site/BarqKadapavi
Please mark the post answered your question as the answer, and mark other helpful posts as helpful.- Proposed As Answer by Ghouse Barq Thursday, August 02, 2012 10:52 AM
- Marked As Answer by Mike FengMicrosoft Contingent Staff, Moderator Thursday, August 09, 2012 2:27 PM

