Beruflich Dokumente
Kultur Dokumente
Web Forms
Web Forms are the User Interface (UI) elements that give your Web applications their look and feel. Web Forms are similar to Windows Forms in that they provide properties, methods, and events for the controls that are placed onto them. However, these UI elements render themselves in the appropriate markup language required by the request, e.g. HTML. Microsoft Visual Studio .NET, you will also get the familiar drag-and-drop interface used to create your UI for your Web application. Web Forms are made up of two components: the visual portion (the ASPX file), and the code behind the form, which resides in a separate class file.
Managed Providers
ADO.NETs Version of Providers (ADO, OLE/DB) and Drivers (ODBC) Not the only way to access data in .NET (most notably the Xml classes) Made up of a number of managed classes that implement known interfaces
System.Data Namespace
Dataset DataTable DataRow DataColumn etc. Data Relation ForeignKeyConstraint
System.Data.Common Namespace
DataAdapter DataTableMapping etc. DbDataRecord
Your Provider
The DataSet
DataSet
Tables
DataTable Rows DataRow DataTable Rows DataRow
Typed DataSets
Strong Typing XSD Based Schema Simple to Setup relationships, constraints, etc. Not very much use if you have amorphous data
DataBinding in ASP.NET
Data Binding is binding controls to data from databases. With data binding we can bind a control to a particular column in a table from the database or we can bind the whole table to the data grid. Data binding provides simple, convenient, and powerful way to create a read/write link between the controls on a form and the data in their application. Working with Data Binding in ASP.NET is slightly different to working with it in VB .NET. In VB .NET, the BindingContext object handles that and it lets us set the record bound control display. In ASP.NET, there is no BindingContext object to handle that. In ASP.NET, we use a DataView to let the user select which record should be displayed in bound controls. We bind the controls using data view and use the RowFilter property of the data view to select the record we want the bound control to display.
@ Page directive
<%@ Page Language="vb" Codebehind="WebForm1.aspx.vb" SmartNavigation="true"%> <html> <body ms_positioning="GridLayout"> <form id="Form1" method="post" runat="server"> </form> </body> </html>
What is a Framework?
Framework is a group of components that work interactively with requests from other components or objects to generate a Framework consistent output. Presentation,
(Black Box)
Example
Framework
(Black Box)
Render: Drop Down List of Users on a Web page or Window Application, recording any errors to the log file
25% complexity
Sub Button1_Click(s As Object, e As EventArgs)... Dim ProxyGetStocks As New _ GetStocks.localhost.Service1() lblResults.Text = _ ProxyGetStocks.GetRating("Contoso") End Sub
C# Code Example
.asmx.vb page
Imports System Imports System.Web.Services Class Service1 <WebMethod()> Public Function function1() As type 'function_here End Function End Class
C# Code Example