ASP NET Relationships between tables Report viewer Radio

ASP. NET Relationships between tables Report viewer Radio. Button List & Dropdown List 1

ASP. NET Relationships between tables 2

The Relationships Between Tables Create the database as usual and as we already knew from the previous lectures. Click on View, and select Server Explorer window. Double-click on your database then all files which are stored in this database will appear. Right-click on Table folder and choose Add New Table. Create the fields you desire and choose their data types. Don’t forget to save your table. For example, create 3 fields “Student. ID” , “Student. Name” and “tel”. 3

Right-click on Table folder again and choose Add New Table to Create a new table. . Create the fields you desire and choose their data types. Don’t forget to save your table. For example, create 3 fields “Course. ID” , “title” and “hours”. 4

Right-click on Table folder again and choose Add New Table. Create the fields you desire and choose their data types. Don’t forget to save your table. For example, create 3 fields “Student. ID” , “Course. ID” and “score”. 5

To assign a foreign key for a table when you in the table definition click on table designer toolbar and choose relationships icon. 6

Select Tables And Columns Specification choice. 7

Select the primary key table. 8

Select the field to be foreign key in this table. 9

Finally select the delete rule. 10

Report viewer 11

Add a “reportviewer”. 12

Add a “Script Manager”. 13

Add New Item > Add a report file. 14

Add a Data. Set. 15

Follow the wizard and select the data connection. 16

17

18

Arranging the report. Right Click> Insert > Table > then add each column by Right click on each cell 19

Radio. Button List & Dropdown List 20

Radio. Button 2 1 21

2 1 3 22

Drop. Down. List 1 2 23

2 1 3 24

25

When you click the button you need to retrieve all selected items: Protected Sub Button 1_Click(By. Val sender As Object, By. Val e As System. Event. Args) Handles Button 1. Click Label 1. Text = " You are : " & Radio. Button. List 1. Selected. Value & " and your age is between: " & Drop. Down. List 1. Selected. Value End Sub 26

27

Questions !! 28
- Slides: 28