Download presentation
Presentation is loading. Please wait.
1
ASP.NET Relationships between tables Report viewer RadioButton List & Dropdown List
2
ASP.NET Relationships between tables
3
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 “StudentID” , “StudentName” and “tel”.
4
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 “CourseID” , “title” and “hours”.
5
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 “StudentID” , “CourseID” and “score”.
6
To assign a foreign key for a table when you in the table definition click on table designer toolbar and choose relationships icon.
7
Select Tables And Columns Specification choice.
8
Select the primary key table.
9
Select the field to be foreign key in this table.
10
Finally select the delete rule.
11
Report viewer
12
Add a “reportviewer”.
13
Add a “Script Manager”.
14
Add New Item > Add a report file.
15
Add a DataSet.
16
Follow the wizard and select the data connection.
19
Arranging the report. Right Click> Insert > Table > then add each column by Right click on each cell
20
RadioButton List & Dropdown List
21
RadioButton 2 1
22
2 1 3
23
DropDownList 1 2
24
2 1 3
26
When you click the button you need to retrieve all selected items:
Protected Sub Button1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles Button1.Click Label1.Text = " You are : " & RadioButtonList1.SelectedValue & " and your age is between: " & DropDownList1.SelectedValue End Sub
28
Questions !!
Similar presentations
© 2025 SlidePlayer.com. Inc.
All rights reserved.