ASP.NET binding using OpenAccessDataSource web control
|
Article relates to
|
OpenAccess Classic
|
|
Created by
|
Jan Blessenohl
|
|
Last modified
|
April 26, 2010
|
|
Last modified by
|
Serge Ovanesyan
|
DESCRIPTION
This article is based on the Reverse mapping "How-To" and shows how easy is to build a website using Telerik OpenAccess ORM persistent classes library.
SOLUTION
Step 1: Open the solution that you have already created by following the Reverse engineering KB article.
Step 2: Add a new web application by execution File -> Add -> New Web Site... from the Visual Studio Menu. ChooseASP.NET Web Site.
Step 3: Add a reference to the class library in the website. Select the website project in the Solution Explorer and execute Website -> Add reference from the Visual Studio Menu. Select the class library project in the Projects tab. All OpenAccess binding controls can open and manage the database by themselves. They only need to be mapped to the context generated by the .rlinq file.
Step 4: Compile everything so that the web page designers can work.
Now you have a project for designing some ASP.NET pages as you are always doing.
Step 5: Copy the connection string from the app.config in your class library to your web project’s web.config. This is what OpenAccess will use to connect to the database.
Step 6: Drag and drop the grid of your choice to the default.aspx file. Open the controls context menu. Select '<New data source>' from the controls 'Choose Data Source' ComboBox. Choose the OpenAccessDataSource which starts the wizard.
Dialog 1: Choose the helper class you did generate and press Next.

Dialog 2: Select the type that you want to bind to the grid. In our case let's choose Order. Press Finish.

Step 7: We are done and you can start your application.
You can now start to design your web pages as you always do.
The example project from this article is available for download in the Code Library.
Comments
If you'd like to comment on this KB
article, please, send us a
Support Ticket.
Thank you!
Please
Sign In
to rate this article.