RAD Studio for Microsoft .NET
ContentsIndex
PreviousUpNext
ASP.NET Procedures

This section provides how-to information on developing ASP.NET Web Forms applications.

Name 
Description 
The following procedures describe the general steps required to build a simple ASP.NET project. For more advanced topics, refer to the related information following the procedure. 
The following procedure describes the minimum number of steps required to build a simple ASP.NET database application such as BDP.NET. After generating the required connection objects, the project displays data in a DataGrid.
For a more detailed database sample using other database technologies for ASP.NET 2.0, see Building an ASP.NET Application with Database Controls 1.
BDP.NET includes component designers to facilitate the creation of database applications. Instead of dropping individual components on a designer, configuring each in turn, use BDP.NET designers to rapidly create and configure database components. The following procedure demonstrates the major components of ASP.NET, ADO.NET, and... more 
This extended example shows how to create a Web page that contains a GridView control and a database control. This example illustrates:
  • Adding an ASP.NET component to a form.
  • Using the Smart Tasks window.
  • Configuring and connecting to a data source.
  • Using SQL to read data from a database.
  • Running the application in a browser.
Note: You can only create ASP.NET projects in CodeGear RAD Studio, not Win32 personalities.
 
This example shows further development of a Web page containing a GridView control and database control. The steps add more capability to the GridView control, including editing. This example illustrates:
  • Using the Smart Tasks window.
  • Changing the configuration of a data source.
  • Running the application in a browser.
 
This example shows further development of a Web page with a GridView control and database control. It adds a FormView control to insert rows. This example illustrates:
  • Adding an ASP.NET component to a form.
  • Using the Smart Tasks window.
  • Editing markup to change a component's appearance.
  • Running the application in a browser.
 
Though simple, the ASP.NET "Hello World" application demonstrates the essential steps for creating an ASP.NET application. The application uses a Web Form, controls, and an event that will display a result in response to a user action. 
This example shows how to create a Web site with a SiteMap, Menu, SiteMapPathand master page. A web.sitemap file is an XML file that describes the structure of a web site. A master page serves as a template for pages in the Web site. A Menu and SiteMapPath allow you to navigate a Web site. This example illustrates:
  • Creating a Web sitemap.
  • Creating a master page.
  • Adding a Menu and SiteMapPath to a master page.
  • Using the Smart Tasks window.
  • Adding content pages referencing the master page to the site.
  • Running the application in a browser.

The example... more 
You can use DB Web Controls, XML caching, and the BDP.NET data adapters to create server-side briefcase applications. You can only create this type of application when using user authentication, to guarantee that each user has a unique copy of the XML file.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
The following procedures describe the minimum number of steps required to build a simple ASP.NET database application using DB Web Controls and BDP.NET. After generating the required connection objects, the project displays data in a DBWebGrid with a DBWebNavigator. Additional information is provided for other common DB Web Controls.
Users should already be familiar with creating an ASP.NET project using BDP.NET.
Building the simple ASP.NET application with DB Web Controls and BDP.NET consists of three major steps:
  1. Prepare an ASP.NET project with BDP.NET or other connection components.
  2. Drag and drop a DBWebDataSource onto the Designer and set its DataSource property... more 
Unlike Web controls, HTML elements can not, by default, be controlled programmatically. However, you can convert an HTML element to a server control and then write code to access or modify the element. Most of the HTML elements that appear in the Tool Palette can be converted by using the Run As Server Control command. HTML elements that do not appear on the Tool Palette, such as body, can be converted manually.
The following procedures explain how to convert an HTML table element by using the Run As Server Control command, and how to convert a body element... more 
You can use XML files as your data source, particularly if you want to prototype applications without reading from and writing to a database. First you must create the XML file. The DBWebDataSource control provides a powerful way to create the XML file based on real database data. This procedure assumes that you can create a connection to a live database containing the data you want to use.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
When you choose to use an XML file for a data source in an ASP.NET application using DB Web Controls, you may need to create the metadata to structure the XML data in your DataSet. If you chose to create an XML file without an XML schema file (.xsd), you need to manually create the metadata. This procedure assumes that you have already created an XML file containing data.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
When you create an ASP.NET application, the IDE automatically creates a virtual directory for you based on the settings in the New ASP.NET Web Application dialog box.
However, the IDE can also create a virtual directory for an application that you did not create within the IDE, such as the demo applications found in the DBWeb folder.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
You can use DBWebAggregateControl to apply one of several standard aggregation functions to a data column. The control displays the aggregate value in a text box, which also support a linked caption.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
During the installation of RAD Studio, the install program requested permission to update the machine.config file on your computer. This information is necessary for debugging RAD Studio applications under IIS. If you replied Yes to that prompt, CodeGear debugger information was written to machine.config and will be available to the applications that you created with Delphi 8. You need not perform this procedure.
If you replied No to that prompt, the debugger information is written to the application web.config file when you create an ASP.NET application with RAD Studio. However, you will need to add this information manually to web.config... more 
You can deploy an ASP.NET application using Blackfish SQL to a system without RAD Studio. 
When attempting to debug your ASP.NET applications, you may find that the error messages are cryptic or even meaningless. This may be the result of having a specific option set in your Internet Explorer browser. To assist your debugging efforts, you should change this option. 
There may be times when you want to modify the order in which columns appear in a DBWebGrid control. You can accomplish this task by binding columns manually, from within the Property Builder.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
You need to grant rights to clients who will be using your ASP.NET applications, if you want to avoid a permissions error when using an XML file as a data source. There are two ways to do this, as described in the following procedures.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
Unlike traditional window-based applications, web applications are dependent on servers and resources that are not directly within the control of the application or the user. Web applications are often hybrid combinations of client, server, and network resources.
The areas you need to check include ASP.NET installation, IIS installation and configuration, and security. All three of these areas are extensive and complex. The following procedures provide solutions to some of the most common problems.
Note: The following suggestions apply only to IIS 5.1.
 
The DB Web Control Wizard helps you create a data-aware web control based on a standard web control.
Note: DB Web Controls (Borland.Data.Web namespace) are being deprecated in 2007. You should use standard Web controls instead.
 
You can add an ASP.NET Deployment Manager to an ASP.NET application project to assist you with deploying the application. The Deployment Manager determines which files are required for deployment, requests the destination directory name and connection information, and then copies the files to the destination directory. The Deployment Manager generates a list of files to copy based on the names of the files in your project directory, but you can include or exclude files as needed.
You can use the right mouse button, when the Deployment Manager window is displayed, to see options for displaying, copying, deleting, modifying, and filtering... more 
When you are creating or editing an HTML file, you can use the Tag Editor window, beneath the Form Designer, to edit the HTML tags. If you are using an ASP.NET Web Form, the Tag Editor is not supported. If you are using an HTML Form, you can display the Tag Editor in the Designer by selecting ViewTag Editor.
The Tag Editor lets you review and modify HTML tags while viewing the corresponding controls in the Designer window, above it. The Tag Editor allows you to use the Code Completion, Error Insight, and Live Template Completion... more 
User controls provide a way to reuse common user interface functionality across ASP.NET web applications. For example, you might create user control that encapsulates a login screen. You could then add the user control to any Web Form that requires the login screen functionality. For more information about user controls, click the link at the end of this topic. 

Copyright(C) 2008 CodeGear(TM). All Rights Reserved.
What do you think about this topic? Send feedback!