Developing Windows and Web Applications using Visual Studio'NET - PowerPoint PPT Presentation

1 / 14
About This Presentation
Title:

Developing Windows and Web Applications using Visual Studio'NET

Description:

... .NET Framework, providing access to relational data, XML, and application data. ... Not compatible across all browsers. function IsEmpty(aTextField) ... – PowerPoint PPT presentation

Number of Views:54
Avg rating:3.0/5.0
Slides: 15
Provided by: jatinva
Category:

less

Transcript and Presenter's Notes

Title: Developing Windows and Web Applications using Visual Studio'NET


1
Developing Windows and Web Applications using
Visual Studio.NET
  • Presented by Adam Cogan

2
Admin Stuff
  • Attendance
  • You initial sheet
  • Hands On Lab
  • You get me to initial sheet
  • Homework
  • Certificate
  • At end of 10 sessions
  • If I say if you have completed successfully ?

3
Session 1 Overview
  • Agenda
  • What is ADO.NET?
  • Whats New in ADO.NET 2005?
  • DataBinding
  • GridView
  • Input Validation

4
The 10 Sessions
  • http//www.ssw.com.au/ssw/events/2005UTSNET/defaul
    t.aspx

5
What is ADO.NET?
  • What is ADO.NET, anyway?
  • ADO.NET is a set of classes that expose data
    access services to the .NET programmer.
  • ADO.NET provides a rich set of components for
    creating distributed, data-sharing applications.
  • It is an integral part of the .NET Framework,
    providing access to relational data, XML, and
    application data.

6
Advantages of ADO.NET
  • ADO.NET vs. ADO
  • Typed Data Sets
  • Why are they better?

Good example typed dataset
Dim OrdersList As New OrdersDataSet txtProductID.T
ext OrdersList.Order_Details(0).ProductID txtPro
ductName.Text OrdersList.Order_Details(0).Produc
tName
Bad example untyped dataset
Dim OrdersList As New OrdersDataSet txtProductID.T
ext OrdersList.Order_Details(0).Item("ProductID"
) txtProductName.Text OrdersList.Order_Details(0
).Item("ProductName")
7
ADO.NET 101
8
DataBinding
  • What is Data Binding?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 a DataGrid (or a
    GridView).
  • 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.

9
DataBinding GridView Demo
Basics of DataBinding
  • C
  • DataSet ds new DataSet()
  • ds YourMethod()
  • GridView1.DataSource ds
  • GridView1.DataBind()

EnglishCreate a new datasetLink your DataSet
to a Method that returns a DataSet Specify the
data source of the GridViewBind the data to the
GridView.
10
GridView
  • GridViews in ASP.NET
  • The GridView control allows you to select, sort,
    and edit these items.
  • The GridView provides a quick way to display a
    Table from a Database.
  • GirdViews are very easy to configure.
  • A GridView can be used without writing any code
    at all even with your own business objects.

11
Input Validation in ASP.NET
  • In the olden days you used JavaScript
  • Hard to debug and maintain
  • Tedious have to write code for every field
  • Not compatible across all browsers
  • function IsEmpty(aTextField)
  • if ((aTextField.value.length0)
    (aTextField.valuenull))
  • aTextField.focus()
  • return true
  • else return false
  • // Call this for each control
  • You can use DHTML etc. but it is not
    cross-browser compatible

12
Input Validation in ASP.NET
  • Enter ASP.NET Input Validation
  • Very easy to use
  • No server round-trip
  • Little or no code all done in the designer
  • Supported in all browsers
  • Powerful validation with regex validator

13
Summary
  • What is ADO.NET?
  • Whats New in ADO.NET 2005?
  • DataBinding
  • GridView
  • Super-powerful Input Validation

14
2 things
EricPhan_at_ssw.com.au JatinValabjee_at_ssw.com.au
Write a Comment
User Comments (0)
About PowerShow.com