notes - Mar Gregorios College

advertisement
DATA GRID
DataGrids are designed for displaying multi-column tables, where every item in a list has single
row with multiple column. A DataGrid provides the easiest way of presenting data.
DATA VIEW
A DataView is used to present a customized view of the data from a DataTable. A DataView can
be filtered, searched, or sorted. By using DataView, two controls can be used to display
different views of the same table from the DataSet. For example, one control can be used to
display all the records from the table, while another control can display rows that are limited by
a specific condition. This condition is set using the RowFilter property.
DATA READER
A DataReader is used when the records of the query are viewed one after the other. A data
reader is used especially when quick access to data is required without storing the extracted
data remotely. A connection to the database server is opened using the connection object’s
open property and the DataReader is created using the command.ExecuteReader(). The
HasRows property of the DataReader returns a value indicating whether the DataReader
contains one or more rows.
Fill in the Blanks
1. ASP.NET is a powerful ------- technology for creating dynamic web pages.
2. ASP.NET ---------enable an HTML-like style of declarative programming that allows users
to build web pages with far less code
3. Folders with a globe represent a distinct -----------.
4. ------------ File is used to store information added by the user at the design time.
5. Using ---------- technique, it is possible to separate code from the user interface logic.
6. Using a --------, it is also possible to import namespace into an .aspx file. We can write
global application code using the-------- file.
7. The global .asax file uses --------- directive instead of a page directive.
8. Server controls are also known as----------.
9. The color object is in ---------namespace.
10. --------- are used to select a single or multiple values from a list of values.
11. The attribute --------indicates that the form should be processed on the server.
12. HTML server controls are defined in the ----------namespace.
13. ------- property of the HTML Table control specific the space between the cell walls and
contents.
1
14. The webcontrol class is defined in ------------ namespace.
15. Setting the --------- property to false can prevent the validation.
16. ---------control makes an input control a required field.
17. The ------- is used to compare the value of one input control of another input control.
18. The ---------- method is used to bind data to controls.
19. Two types of data binding supported in ASP.NET are -------- and ----------20. The minimum parameters required to establish a connection are -------- and ---------.
21. The --------is a collection of static and disconnected recordsets.
22. ---------- are used to define the content and formatting of a control.
23. The controls that support templates are --------, -------- and ---------.
24. --------is used to provide a different look alternating row in the Repeater control.
ANSWERS
1. Server-side
2. Server controls
3. Virtual directory
4. .resx
5. Code behind programming
6. Directive
7. Application
8. Form controls
9. System.Drawing
10. Selection controls
11. Runat=”server”
12. Wystem.web.UI.HtmlControls
13. Cellpadding
14. System.web.UI.Webcontrols
15. Causes Validation
16. RequieredField Validator
17. Compare Validator control
18. DataBind()
19. Single value and repeated value Data Binding
20. ProviAdapter
21. DataSet
22. Templates
23. DataList,DataGrid, and Repeater controls.
24. AlternatingItem Template.
2
State True or False
1.
2.
3.
4.
5.
ASP.NET Pages work in all browsers.
Classic ASP supports VBScript and Jscript.
Explicit compile step is required in ASP.NET.
ASP.NET is crash tolerant than ASP.
Web pages from other ASP.NET application residing in the same server do not share
resources.
6. Application domains are isolated in memory.
7. HTML input controls that cannot have child elements.
8. The ColorTranslator class is used to specify the HTML color names.
9. Labels are used to display read-only text on the form.
10. Source property of the image control is used to specify the URL of the image to be
displayed.
11. The <Row> element is used to create a table in HTML.
12. All HTML server controls must be within the HtmlForm control.
13. The InitialValue property of the RequieredFieldValidator control is used to set the
default value for the input control.
14. Validation server controls are used to validate user-input.
15. ValidationSummary control displays a report of all validation errors occurred in a
web page.
16. The data remains in the controls, if the Enable Viewstate property is set to true.
17. Hashtables always require keys for accessing data.
18. Connection manages all the communication between ADO.NET application and the
data source.
19. The Data Provider recommended to access SQL Server 7.0/2000 data sources is
ODBC.NET.
20. In ADO.NET, the fundamental format for transferring data is XML.
Answers
1.
2.
3.
4.
5.
6.
7.
8.
True
False
False
True
True
True
True
True
3
9. True
10. False
11. False
12. True
13. False
14. True
15. True
16. True
17. True
18. True
19. False
20. True
Dialog Boxes
A Dialog box is a temporary window that contains controls, which can be used as follows:
 To display information and messages for the user.
Features
 A Dialog box cannot be resized.
 A Dialog box rarely acts as the main interface of the application. A dialog box is used to
acquire user input to execute a certain action, or to display messages.
 A dialog box usually does not have a menu.
Some Common Dialog Boxes

openFileDialog Control
 This control is used to open file. It is similar to the Open File dialog box provided
windows operating system.

PageSetUpDialog Control
 This control is used to set Page options such as Paper size, Left margin and Right
margin. It allows users to manipulate page settings such as margins and paper
orientation.
4
 FontDialog Control
 This control is used to specify the font options such as the font name, font size,
and font color. This control displays a list of fonts that are currently installed on
the system and allows the user to manage font properties such as font size, font
style and color.
 ColorDialog Control
 This control is used to select a color. It displays a wide variety of colors and
allows the user to select one of the displayed colors.
 SaveDialog Control
 This control is used to provide the functionality of saving a file. It allows users to
specify options for saving a file
 PrintDialog Control
 This control is used to allow to select a printer and specify the portions of the
document that need to be printed.
5
Download