Building ASP.NET Web Applications with Oracle Developer Tools for Visual Studio .NET
Building .NET Applications Using Oracle Developer Tools For Visual Studio .NET
Building ASP.NET Web Applications
with Oracle Developer Tools for Visual Studio .NET
This tutorial describes how you can build ASP.NET web applications
that access Oracle Database using Oracle Developer Tools for Visual Studio .NET
Approximately 20 minutes
This tutorial covers the following topics:
Place the cursor over this icon to load and view all the screenshots for this tutorial.
(Caution: This action loads all screenshots simultaneously, so response time may be slow depending on your Internet connection.)
Note: Alternatively, you can place the cursor over an individual icon in the following steps to load and view only the screenshot associated with that step. You can hide an individual screenshot by clicking it.
Oracle Developer Tools for Visual Studio .NET is a tightly
integrated "add-in" for Visual Studio 2005. This tight integration
makes it easy to create ASP.NET Web Applications that access Oracle database
without requiring the developer write much code.
Back to Topic List
Before starting this tutorial, you should first complete the following steps:
| 1. |
Install Oracle Database 10g or above |
| 2. |
Install Visual Studio 2003 or above |
| 3. |
Install ODAC 11g Beta |
Back to Topic List
To create an ASP.NET web site, perform the following steps:
| 1. |
From your Windows Start menu, start Visual Studio.
|
| 2. |
From File menu, select New > Web
Site.
|
| 3. |
In the New Web Site window, select ASP.NET Web
Site and click OK.
|
Back to Topic List
To create a gridview, perform the following steps:
| 1. |
In the Default.aspx tabbed page, click the Design
tab.
You get a blank canvas as shown in the screenshot below.
|
| 2. |
From View menu, select Toolbox.
|
| 3. |
In the toolbox, expand Data. Drag the GridView
control to the Design area.
The design area gets the Gridview control as shown in
the screenshot below.
|
Back to Topic List
To create a new data source, perform the following steps:
| 1. |
If you do not see the GridView Tasks pane, click the
>symbol to get it, as highlighted in the screenshot.
Select <New data source...>
from the Choose Data Source drop down.
A Data Source Configuration wizard starts.
|
| 2. |
Select Database. Enter HR as the ID
for the data source. Click OK.
|
| 3. |
Click New Connection...
|
| 4. |
In Add Connection dialog box, ensure the Data Source is set to Oracle
Database Server(Oracle ODP.NET).
Note: If the Data source is not already set to Oracle
Database Server(Oracle ODP.NET) then click Change to select the
Data Source provider.
In the Change Data Source dialog box, select Oracle Database Server
as the Data Source and Oracle Data Provider for .NET as the Data
Provider. Click OK.
|
| 5. |
In the Data source name drop down, select the <SID>
of your Oracle Database instance. Enter HR for the Username
and Password. Click Test Connection.
|
| 6. |
Your test was successful. Click OK.
|
| 7. |
Click OK.
|
| 8. |
Click Next.
|
| 9. |
Click Next to save the connect string
in the application configuration file.
|
| 10. |
Select the EMPLOYEES table from the Name drop down.
Click the checkbox in front of *. Click Next.
|
| 11. |
Click Test Query.
|
| 12. |
The result of your query is shown. Click Finish.
|
| 13. |
Click the Enable Paging checkbox.
|
Back to Topic List
To run the ASP.NET web application, perform the following
steps:
| 1. |
Select Build > Build Solution.
|
| 2. |
Select Debug > Start Debugging.
|
| 3. |
Click OK to modify the web.config file to enable debugging.
|
| 4. |
A web browser will open showing the web application.
|
Back to Topic List
In this tutorial, you learned how to:
 |
Create a ASP.NET web site |
 |
Create a GridView |
 |
Create a new Data Source |
 |
Execute your web site |
Back to Topic List
Move
your mouse over this icon to hide all screenshots.
|