[ ASP.NET WebForm C# ] Oracle CRUD Operations Tutorial – Overview
ASP.NET is a web application framework developed by Microsoft to allows web developer to build dynamic web sites or web applications easily. It allows you to use a full featured programming language such as C-Sharp (C#) or Visual Basic (VB).
- This tutorial covers all the basic elements of ASP.NET and C# programming language that a beginner would require to get started.
- This tutorial is intended for understanding of Create, Read, Update and Delete (CRUD) operation in ASP.NET and using Oracle as database.
- In this tutorial, I will explain how to :
- Create a new ASP.NET WebForm project.
- Setup project
- add libraries such as bootstrap, jQuery, Font-awesome, SeetAlert2
- add NuGet package for Oracle.ManagedDataAccess
- add database connection
- Create new MasterPage contains logo and navigation bar with menu
- Create new WebForm (Main page) contains header (<h1>) and welcome message
- Create new WebForm (Customers page) contains header (<h3>), textbox and button for searching record.
- Add SqlDataSource and GridView.
- Show list of records in GridView,
- Search records from database and show as list of records in GridView,
- Create new WebForm (CustomerDetails page) contains header (<h3>), label, textbox and button for CRUD operation.
- Insert new record into database,
- Show record details,
- Update record into database,
- Delete record from database (directly from Gridview and from page record details).
To explain further about how to bind data in asp.net gridview and perform insert, update and delete operations, we need to create database table to read data and bind retrieved result set into gridview, so simply execute SQL scripts to SQL editor to create database table and then add few records manually or download complete example code with script at the end of this page. Hope you already have the database knowledge including creating tables, creating sequence, creating trigger and writing queries. You need to add ConnectionString in Web.config according to your database settings.
It is easier to understand this tutorial if you have the following basic knowledge:
- Visual Studio / Visual Web developer (it would be nice if you have latest version)
- .NET Framework (it would be nice if you have latest version)
- Oracle + Oracle GUI Tool (it will be easy for you if you have Oracle GUI tool)
- Basic knowledge of SQL, ASP.NET and C#
Here, I’ll not cover development of an attractive User Interface. I will only focus on how Oracle CRUD operations can be performed in ASP.NET C#.
Let’s start with the use case scenario and screenshot.
Use Case Scenario
This will allows user to:
- list all records
- find records
- add new record
- view a record details
- update record
- delete record
An alert will be display on each operation. Also will validate each of mandatory fields.
Screenshot
Recent Comments