lesson_10 data binding
TRANSCRIPT
-
8/7/2019 Lesson_10 Data binding
1/14
WEB ENGINEERING-IIUSING ASP.NET
B Y
A DN A N A M I NL E C T U R E R / SO F T WA R E P R O G RA M M E R
I N F O R M AT I O N A N D C OM M U N I C AT I O N T E C H N O L O G Y ( I C T D EP T )
-
8/7/2019 Lesson_10 Data binding
2/14
OVERVIEW Configuring sql data source Codes Creating connection Coding for Configure sql data source Add & configure the datagrid controls Important features for datagrid control Add & configure the datalist controls Add & configure the DetailView controls
-
8/7/2019 Lesson_10 Data binding
3/14
CONFIGURING SQL DATA SOURCE First Create a new web site. Add Web form from Website menu by clicking Add New Item. Add SqlDataSource Server Control from the ToolBox. Drag and Drop onto Web Form. Click on Configure Data Source
from the Pop up menu.
-
8/7/2019 Lesson_10 Data binding
4/14
STEP:1 CREATING CONNECTION Click on the New Connection Button.
-
8/7/2019 Lesson_10 Data binding
5/14
STEP:21. Enter the Server name
e.g:
COMPUTER1/SQLEXPRESS
2. Select or Enter a databasename
e.g:
Northwind
Click on Ok Button.
-
8/7/2019 Lesson_10 Data binding
6/14
SAVE THE CONNECTION STRING TO THE APPLICATIONCONFIGURATION FILE
Enter Any name for new connection or just Click on the check box.
Yes, save this connection as:
-
8/7/2019 Lesson_10 Data binding
7/14
CONFIGURE THE SELECT STATEMENT
-
8/7/2019 Lesson_10 Data binding
8/14
CODES CREATING CONNECTION Open Web.config page.
-
8/7/2019 Lesson_10 Data binding
9/14
CODING FOR CONFIGURE
SQL DATA SOURCE
Default.aspx
Add SqlDataSource on to web form.
-
8/7/2019 Lesson_10 Data binding
10/14
ADD & CONFIGURE THE DATAGRID
CONTROLS
Create Page1.aspx from Add new Item (web site menu) Add DataGrid Control from the Data category of toolbox. Select the Data Source from the Drop Down
List.
-
8/7/2019 Lesson_10 Data binding
11/14
IMPORTANT FEATURES FOR DATAGRID CONTROL
Enable Paging Enable Sorting Enable Selection
-
8/7/2019 Lesson_10 Data binding
12/14
ADD & CONFIGURE THEDATALIST CONTROLS
Create Page2.aspx from Add new Item (web site menu) Add DataList Control from the Data category of toolbox. Select the Data Source from the Drop Down
List.
-
8/7/2019 Lesson_10 Data binding
13/14
ADD & CONFIGURE THE DETAILVIEW CONTROLS
Create Page3.aspx from Add new Item (web site menu) Add DetailView Control from the Data category of toolbox. Select the Data Source from the Drop Down
List.
-
8/7/2019 Lesson_10 Data binding
14/14
ASSIGNMENTDifferentiate DataList, DataGrid, DetailView and FormView
Control.