Wednesday, July 1, 2009

Generating an ASP .NET database application

You can generate an application that uses ASP .NET and a Microsoft SQL Server database. To generate this type of application, you must have a local .NET installation and access to a target Microsoft SQL Server database table. You can generate an application that uses an ASP .NET page to access a database and return data to the Flex application.

Generate ASP .NET application code

1. If you have not already done so, create a new Flex project that specifies ASP .NET as the application server type. You can deploy the application to the Visual Studio Development Server or the Internet Information Server (IIS) web server that comes with Windows. If you use IIS, the deployment directory specified in the New Flex Project wizard must be defined in the IIS administration console as an ASP Application.
2. Select Data > Create Application from Database.
3. From the Project list, select the ASP .NET project to use.
4. From the Connection list, select a database connection profile. To create and use a new connection profile, click the New button and complete the text boxes.
5. From the Table list, select the database table to use.
6. From the Primary Key list, select the primary key of the database table.
7. Click Next.
8. Specify a .NET class name, or accept the default value.
9. Choose either C# with Web Services or VB with Web Services as the server language.
10. Click Next.
11. (Optional) Deselect any of the listed table fields to exclude them from the generated Flex DataGrid control.
12. Click Finish.
13. Select Run > External Tools > Run As > Run on Server.
14. Select Run > Run to run the application on the server.

Directory structure and deployment considerations for ASP .NET

When you run Project > Export Release Build, files are saved in the project bin_release directory and the optimized application runs from that location.

No comments:

Post a Comment