wayground logo

Free Printable Worksheets

Font size

S
M
L
XL
Worksheets

data list control

Total questions: 10

Worksheet time: 5mins

Name
Class
Date
1.

In a DataList control, how can you ensure that only every third item is styled differently?

a)
Set the CssClass property of the DataList control to 'every-third-item'.
b)

Handle ItemDataBound event and apply styles based on item index

c)

Use AlternatingItemTemplate with custom logic

d)
Apply styling to items based on their content rather than their index in the DataList control.
2.

Which event is raised when the page index changes in a paged DataList control?

a)
PageChanged
b)
PageIndexChanged
c)
IndexChangedPage
d)
PageSwitched
3.

How can you dynamically resize a DataList control in response to changes in the browser's size using client-side scripting?

a)

Implement a JavaScript function that listens for the window resize event and adjusts the DataList's width and height properties accordingly.

b)

Use CSS media queries to detect changes in the viewport size and apply different styles to the DataList based on the viewport width.

c)

Set the AutoSize property of the DataList to true to enable automatic resizing based on the browser's dimensions.

d)

Use ASP.NET AJAX UpdatePanel control to refresh the DataList automatically when the browser's size changes.

4.

The CommandArgument property of a Button control within a DataList allows passing additional data to the ItemCommand event handler

a)

yes

b)

no

5.

Which CSS technique can you use to make a DataList responsive to browser size changes

a)
CSS media queries
b)
JavaScript functions
c)

Flexbox

d)

Grid Layout

6.

How can you access the data associated with the clicked item in a DataList control?

a)
Use the SelectedItem property of the DataList control.
b)

by using selected

datalist()

c)

Both 1,2,4

d)
Handle the ItemCommand event and use the CommandArgument property of the clicked item.
7.

what does this code try to do

a)
Sort a list of integers in ascending order
b)

Used to create an event

c)

Parse and information from a JSON document

d)

Parse and edit event handler

8.

A DataList control can be used to display hierarchical data structures with parent-child relationships.

a)

True

b)

False

9.

The (a)   property of the DataList control specifies the number of columns in which the items are displayed.

10.

The (a)   event of the DataList control is raised when a postback occurs and before the server control is rendered.