Data Access  «Prev  Next»

Lesson 2 Binding data-bound Design Time Controls
Objective Add a recordset object and bind it to other controls in the database to display data.

Binding data-bound Design Time Controls

While Visual InterDev is no longer a current product, Microsoft offers a set of technologies that provide similar and enhanced features for connecting to SQL Server databases and designing web pages with drag-and-drop capabilities. Here's a breakdown of the modern equivalents:
Connecting to SQL Server Databases:
  • SQL Server Management Studio (SSMS): This is the primary GUI tool for managing and interacting with SQL Server. It allows you to browse databases, write and execute queries, and manage database objects.
  • Visual Studio with SQL Server Data Tools (SSDT): Visual Studio, particularly with the SSDT workload installed, offers robust database connectivity features. You can connect to SQL Server, design database schemas visually, write and debug stored procedures, and work with data directly within the IDE.
  • .NET Framework/ .NET (formerly .NET Core) with ADO.NET: These development platforms provide extensive libraries (ADO.NET) for programmatically connecting to SQL Server and executing database operations from your web applications. You can use various data providers like SqlClient to interact with SQL Server.
  • Entity Framework (EF Core): This is a modern Object-Relational Mapper (ORM) for .NET that simplifies database interactions by allowing you to work with data using .NET objects. It supports SQL Server and provides features like LINQ queries and automatic schema migrations.
  • Azure Data Studio: A lightweight, cross-platform database tool for working with SQL Server, Azure SQL Database, and other data sources. It offers a modern editor with IntelliSense, query execution capabilities, and customizable dashboards.
  • Power BI Desktop: While primarily a business intelligence tool, Power BI Desktop can connect to SQL Server and allows you to visually explore and analyze data.

Drag-and-Drop Features for Web Page Design:
  • Visual Studio Designer: When working with ASP.NET Web Forms or ASP.NET MVC/Core projects in Visual Studio, the designer provides a drag-and-drop interface for creating web pages. You can drag and drop HTML elements, server controls (.NET Framework), or Tag Helpers/HTML Helpers (.NET Core) onto the design surface.
  • ASP.NET Web Forms Controls: Although an older technology, ASP.NET Web Forms provided a rich set of server-side controls that could be dragged and dropped onto a page. These controls automatically rendered HTML and handled server-side logic.
  • Blazor: This framework for building interactive client-side web UI with .NET allows for component-based development. While not strictly drag-and-drop in the same vein as Design Time Controls, component libraries often provide pre-built UI elements that can be easily integrated into your pages.
  • HTML Designers in Modern IDEs (VS Code, etc.): Modern IDEs like Visual Studio Code often have extensions that provide improved HTML authoring experiences, including features like IntelliSense, code completion, and sometimes visual aids that can enhance the design process, even if they aren't full drag-and-drop environments.
  • Power Pages: This platform, part of the Microsoft Power Platform, offers a low-code drag-and-drop interface for building business websites that can connect to data stored in Microsoft Dataverse (which can integrate with other data sources, including SQL Server).
The legacy features of Visual InterDev are now facilitated by a combination of tools and technologies:
  • For database connectivity, you would primarily use SQL Server Management Studio, Visual Studio with SSDT, ADO.NET, Entity Framework Core, and Azure Data Studio.
  • For drag-and-drop web page design, you would likely use the Visual Studio Designer (especially for ASP.NET Web Forms or MVC/Core), leverage component-based frameworks like Blazor, or explore low-code platforms like Power Pages for certain scenarios.
It's worth noting that web development has evolved significantly since the era of Visual InterDev. Modern approaches often emphasize component-based architectures, client-side frameworks, and more separation between front-end and back-end development. While drag-and-drop tools still exist, developers often work more directly with HTML, CSS, and JavaScript/TypeScript in conjunction with powerful IDE features.
Toolbox
The image shows the Toolbox panel in Microsoft Visual InterDev, specifically focused on Data-Bound Design-Time Controls (DTCs). These components were commonly used in legacy ASP applications to visually bind HTML elements to data sources.
Primary Components (under "Design-Time Controls"):
  1. Pointer
  2. Recordset
  3. Label
  4. Textbox
  5. Listbox
  6. Checkbox
  7. OptionGroup
  8. Button
  9. Grid
  10. RecordsetNavbar
  11. FormManager
  12. PageNavbar
  13. Timelines
  14. PageTransitions
  15. PageObject
Additional sections/tabs visible at the bottom:
  • HTML Outline
  • Toolbox (active)
  • Script Outline

Data-bound DTCs[1] made it quite easy to add user interface elements to the database. With them, your application could connect to and navigate in the database, as well as make changes to recordsets. The data-bound DTCs included HTML controls, the recordset control, RecordsetNavBar control, and the Grid control.

Accessing Data with ADO.NET


Binding DataBound Design TimeControls - Exercise

Click the Exercise link below to practice adding a Recordset DTC that allows users to browse current specials in the VirtualBookShelf.com Web site.
Binding DataBound Design TimeControls - Exercise
In the next lesson, you will learn how to add a command object to a Web page.

[1]data-bound DTC: A data-bound DTC is associated with a specific data item. DTCs are not data-bound until this is done. For example, you can drag a DTC onto a page, but it is not bound to anything until it's properties are set.

SEMrush Software 2 SEMrush Banner 2