Thứ Năm, 23 tháng 5, 2013

Đề thi DHA


1. You want to pass the user name entered in the login form to another Web page .Which of the following parameters in the parameterized queries helps you to archive this task ?
  1. Form
  2. Cookie
  3. Control
  4. QueryString
2. Which of the following codes retrieves the number of items in the control?
  1. Response.Write(this.objLstCountries.AllFields[0].Title);
  2. Response.Write(objLstCountries.SelectedIndex);
  3. int count = objlstCountries.ItemCount;
  4. if(objlstCountries.SelectListItem(o,false))
  {
          Response.Write("Selected");
                  }
3. Which of the following codes correctly removes the item named StudentsDataTable from the cache ?
  1. Cache.Delete("StudentsDataTable");
  2. Cache.Remove("StudentsDataTable");
  3. Caching.Remove("StudentDataTable");
  4. Caching.Clear("StudentsDataTable");
4. The ......element in the Web.config file stores the connection string.
  1. connectionData
  2. connectionStrings
  3. connectionType
  4. connection
5. Which approach specifies the location of output cache using the Location attribute of @OutputCache directive?
  1. parameterized approach
  2. Substitution approach
  3. Declarative approach
  4. Programmatic approach
6. Items stored on the cache are removed using the....... method.
  1. Cache.Remove()
  2. Cache.Delete()
  3. Cache.Erase()
  4. Cache.Drop(0
7. Which of the following statements about untyped datasets are true?
  1. Untyped datasets require you to create the schema for the dataset.
  2. It is not possible to work with data from a database using untyped datasets.
  3. An  object is created when you create an untyped dataset.
  4. The NewRow() method is used to add rows into an untypted DataTable that is part of an untyped dataset.
8. How many instances of the Cache class representing a Cache object Web application?
  1. One
  2. Two
  3. Depends on the number of pages in the application
  4. Zero
9. A user control is cached by including an ....... directive in the .ascx file of  control?
  1. @Cache
  2. @OutputCache
  3. @Register
  4. @Control
10. Which of the following statement correctly describe the usage of the XmlReader.ReadString() method ?
  1. It retrieves the XML representation of the data in a DataSet object as a string.
  2. It returns the XML content as an XmlReader object.
  3. It reads content and optionally schema from an XML stream or file into a DataSet object.
  4. It reads the content of an element or text node as a string.
11. Which of the following techniques can be used to add parameters queries as design time?
  1. Using Configure Data Source dialog box
  2. Using markup elements such as and .
    1. Only 1
    2. Only 2
    3. 1 and 2
12. You want to add SQL dependency for a connection string ... database should be polled every 7 minutes. Which one.....you to accomplish this?
     A.
            (pollTime tính bằng millisecond tương đương 60 giây là 60000 mili giây)
              
     B. 
             
               
     C.  
             
               
      D. 
             
                
 13. Which property of data source controls retrieves the time in seconds for which the control caches the data ?
  1. EnableCaching
  2. CacheExpirationPolicy
  3. SqlCacheDependency
  4. CacheDuration
 14. Which of the following Boolean properties in a SiteMapDataSource control sets or gets a value to indicate whether the start node is displayed?
  1. StartFromCurrentNode
  2. ShowStartingNode
  3. StartingNodeUrl
  4. ShowStartNode
  15. .................. represents a query or a command that is to be executed by a data source
  1. Connection
  2. Command
  3. DataSet
  4. DataApdater
  16. ......... is a mobile control that is exclusively designed for mobile data access and can display a list as well as a detail view.
  1. SelectionList
  2. List
  3. DropDownList
  4. ObjectList
   17. ....... is a group of class that enables the developers to connect to RDBMS
  1. ADO.NET
    1. AOD.NET
    2. ASP
    3. OAD.NET
  18. Which of the following codes retrieves the connection string from....
  1. String conString = ConfigurationManager.ConnectionStrings["TestConnection"];
  2. String conString = WebConfigurationManager.ConnectionStrings["TestConnection"].ToString();
  3. String conString = Config.ConnectionStrings["TestConnection"].ToString();
  4. String conString = WebConfiguration.Connection["TestConnection"].ToString();
  19. Which of the following dataset class represents the data type of Column of DataTable ?
  1. DataRow
  2. DataColumn
  3. DataTable
  4. DataColumnCollection
   20. Which of the following classes stores the frequently used application for a Web application?
  1. System.Web.Cache
  2. System.Web.Caching.Cache
  3. System.Web.Caching
  4. System.Cache
   21. Which of the following are the new features provided in ASP.NET 2.0 ?
  1. Control that access data from the back-end database.
  2. Control that can display data in various formats.
  3. Direct connections can be established as a local file to an SQL Express database.
    1. 1 2
    2. 1 3
    3. 2 3
      1. All of the above.
   22. Which property of the GridView control regarding paging functionality indicates whether the paging buttons are displayed?
  1. PagerSettings.PreviousPageText
  2. PagerSettings.Visible
  3. PagerSettings.Mode
  4. PageIndex
   23. ...... is a process by which the data in the control belonging to the UI have a direct link to the data in the database.
  1. Static binding
  2. Dynamic binding
  3. Data binding
  4. Data Linking
   24. The ....... method of a SqlCommand object returns an instance of SqlDataReader class .
  1. Execute()
  2. ExecuteReader()
  3. Create()
  4. Init()
   25. Which of the following are valid events of DataList control ?
  1. SelectedIndexChanged
  2. DeletingCommand
  3. UpdateCommand
  4. CancellingCommand
  5. EditCommand
    26. Which event is raised when each item in a mobile List control is being data bound?
  1. ItemDataBound
  2. DataItemBind
  3. ListItem
  4. ItemDataBind
    27. Which property of @OutputCache directive creates a new version of a page if the request for the same page comes from a different browser ?
  1. VaryByHeader
  2. VaryByParam
  3. VaryByVersion
  4. VaryByCustom
   28. The.....object is used to fetch and update the data from the database.
  1. DataSet
  2. Data adapter
  3. DataTable
  4. DataColumn
   29. The.... data source control enables you to work with ASP.NET site navigation through XML-based site maps.
  1. SqlDataSource
  2. XmlDataSource
  3. SiteMapDataSource
  4. NavigationDataSource
  30. Which of the following represents the correct directive to be used when working with data sources associated with an OracleConnection ?
  1. using System.Data.Oracle;
  2. using System.Data.OracleDb;
  3. using System.Data.OracleClient;
  4. using System.Data.Odbc;
   31. The..... Datasets require the user to hard-code the schema of the dataset.
  1. untyped
  2. typed
  3. row
  4. column

32. Which of the following codes correctly clears the content of the dataset and fills it with rows of data ?
       A. dsetFootwear.Tables["Footwear"].clrscr();
            sdaFootwear.doFill(dsetFootwear,"Footwear");
       B. dsetFootwear.Tables["Footwear"].ClearAll();
           sdaFootwear.FillDataset(dsetFootwear,"Footwear");
       C.dsetFootwear.Tables["Footwear"].FlushAll();
           sdaFootwear.FillSet(dsetFootwear,"Footwear");
       D. dsetFootwear.Tables["Footwear"].Clear();
            sdaFootwear.Fill(dsetFootwear,"Footwear");
33. Which one of the following statement stating the characteristics of OleDbDataReader class is true ?
  1. It reads a stream of rows from a SQL Server database.
  2. It reads a stream of rows from a data source that is associated with an OleDbConnection.
  3. It reads a stream of rows from a data source associated with an OdbcConnection.
  4. It reads a stream of rows from Oracle data sources.
34. Which of the following classes generates dynamic customized views of your data which you can then display and manipulate?
  1. DataView
  2. GridView
  3. DataList
  4. DetailsView
 35. Which of the following are the ways to add items to a cache?
  1. Using key/value pairs
  2. Using Cache.Insert() method
  3. Using Cache.Add() method
    1. 1 3
    2. 2 3
    3. 1 2
      1. All of the above
  36. The ...... property specifies whether the display of records will be repeated horizontally or vertically.
  1. RepeatDirection
  2. RepeatLayout
  3. RepeatColumns
  4. RepeatList
  37. Which of the following Web server control presents the data in a list?
  1. DataControl
  2. DataList
  3. GridView
  4. DataBind
  38. Following is a series of steps to bind a data source control to a data-bound control on a Web form .
  1. Bind the data source control to a data-bound control.
  2. Add the data source control to the Web form.
  3. Configure the properties of the data source control.
  4. Select the kind of data source control.
  5. Select the data provider.
    1. 4 5 2 3 1
    2. 1 2 3 4 5
    3. 2 4 5 3 1
    4. 4 3 1 2 5
  39. Which of the following codes will allow you to fill an untyped dataset named dsetEmplyees with the data from the Employees table in a SQL Server 2005 database?
SqlConnection sqlconPubs = new SqlConnection("Data Source=10.2.1.51;Initial Catalog=pubs;User ID =sa;Password=playware");
SqlDataAdapter sdaEmployee = new SqlDataAdapter("select * from Employees",sqlconPubs);
DataSet dsetEmployee = new DataSet();
sdaEmployee.Fill(dsetEmployee,"Employees");

1.
The SqlDataSource and XmlDataSource controls are asociated with a data-bound control using the _________________ attribute.
  1. DataSourcedB
  2. 2.      DataSourceID
  3. DataSourceIdentity
2.
A _____________ object can be created either by using its constructor or creating a reference tho the DefauleView property of the DataTable.
  1. DataReader
  2. 2.      DataView
  3. OrclDataReader
3.
The __________ class provides properties and methods to work the schema information returned in a DataTable.
  1. 1.      SqlDataReader
  2. DataSet
  3. CommandBehaivior
4.
The InvalidOperationException and IndexOutOfRangeException can be handled through _______________ .
  1. 1.      DataReader class
  2. Try-catch bloacks
  3. DBNull() method
5.
Which of the following are the features of ADO.NET?
  1. It helps to create, use and manipulate data easily.
  2. it enables to connect to the RDBMS.
  3. it does not support XML.
  4. It enables to work with disconnected data.
  5. It exists only in the form of collections.
A. 1, 3, 4 B. 2, 4, 5 C. 1, 2, 4 D. 3, 4 ,5
6.
This parameter is used to set the value of parameter in a query base on a client-side cookies value that is passed as part of an HTTP request.
  1. Session
  2. 2.      QueryString
  3. 3.      Cookie
  4. 4.      Form
  5. 5.      Control
7.
This indicates the logical layout of a web site and is useful in navidation. It can be represented as breadcrumbs on individual Web page. It is created by ASP.NET and stored as XML file.
  1. 1.      Web.config
  2. SiteMap
  3. SiteMapDataSource
8.
Specifies or retrieves the type of expiration policy used to invaliedate a cache item.
  1. 1.      CacheExpirationPolicy
  2. CacheExpiration
Enablecaching: retrieves Boolean value indicating caching is enabled or not
DataSourceMode: retrieves a value indicating the retrieval mode used to fetch data
CacheDuration: retrieves the time in seconds for which the controls caches the data
SqlCacheDependency: retrieves database entry-table value pairs.
9.
The SqlDataSource control allows you to retrieve data and modify in the MS SQL Server databases, OLEDB databases as well as ODBC or Oracle databases.
  1. True
  2. 2.      False
10.
This Sets or Gets the URL of a node in the site map, which will be used by the data source control to build the site map structure.
  1. StartNodeUrl
  2. 2.      StartingNodeUrl
  3. ShowStartingNode // if the start node is displayed or not
  4. StartFromCurrentNode // if the site map node tree is retrieved using the node represented by the current page or not
Mon DHA
1. Objects associated with ADO.NET technology are:
[a] Connection
[b] DataSet
[c] Command
[d] T-SQL
[e] Binding Source Component

2. There are two types of Dataset:
[a] Typed Dataset
[b] XML Dataset
[c] Untyped Dataset
[d] Complex Dataset

3. The RepeatDirection property of DataList specifies whether the display of records will be repeated. There are two optopns:
[a] Horizontal
[b] Vertical

[c] Table
[d] Flow

4. Select correct statements about DataReader and SqlDataReader:
1. DataReader object do not support paging or sorting functionality
2. Forward-only and Read-only
3. The SqlDataReader class is defined in the System.Data.Sql namespace

5. We can use the ………. property to check if a SqlDataReader has any rows.
[a] HasRows
[b] HasRow
[c] Read
[d] Next
6. DataSet class provides three XML-based methods namely: (Choose 3)
[a] ReadXml()
[b] WriteXml()
[c] GetXml()

[d] SetXml()
[e] FindXml()
7. There are some types of Cache Location in Page Output Caching. These are:
[a] None
[b] Client
[c] Server

[d] Any
[e] ServerAndClient
[f] Downstream
[g] All of these


8. Which of the following Web site cannot be created in the IDE?

1. File System Web sites
2. Local IIS Web sites
3. Remote Web site
4. FTP Web site

1, 2, 3
2, 3, 4
1, 2, 3, 4
None of the above.

9. Which of the following are the ways to access Web sites hosted on the IIS?
1. Specifying the IP address
2. Specifying local host with optional port number
3. Specifying IIS name
4. Specifying the machine name

1, 2, 3
2, 3, 4
1, 2, 4
1, 2, 3, 4


10.Which of the following attribute of the @ Register directive specifies an alias that provides a link with the namespace?

src
tagname
tagprefix
tagspace

11. Action events are control events that are executed when the Web page is requested for the next time.

TRUE
FALSE

12. Which of the following property of the RadioButtonList control specifies the number of pixels between the border and the contents of the table?


CellPadding property
CellSpacing property

TextAlign property

13. The ____________________property specifies or retrieves the text between the opening and closing tags of the specified server control.

Style
InnerText
Target
Enctype

14.The Request Cookies Collection section of Trace class displays the cookies that are passed during the page request.

TRUE
FALSE

15.The ______________________________represents the ODBC.NET data provider.

System.Data.Odbc namespace
Oracle.Data.Odbc namespace
.NET Framework
ODP.NET


16.Which of the following methods are provided by the DataSet class?

1. HasChanges()
2. GetChanges()

3. AddChanges()

1, 2
2, 3
1, 3
1, 2, 3

17.Which of the following class provides IsDBNull() and NextResult() methods?

IndexOutOfRangeException
SqlDataReader
CommonDataReader

18. The XmlDataSource control is used to display XML data in a data-bound control such as GridView.
TRUE
FALSE

19. Which property of the SiteMapPath control is used to change the order in which the links appear?

1)PathDirect
2)Direction
3)PathDirection

20.Which property of the SiteMapPath control is used for all nodes displayed?

1)CurrentNodeStyle
2)RootNodeStyle
3)NodeStyle
4)PathSeparatorStyle

1
1, 3
2
2, 3
3
All of the above

21. The Menu control supports which of the following templates?
1)StaticMenuItemTemplate
2)DynamicMenuItemTemplate  
3)DynamicTemplate
1.
The SqlDataSource and XmlDataSource controls are asociated with a data-bound control using the _________________ attribute.
1.      DataSourcedB
2.      DataSourceID
3.      DataSourceIdentity
2.
A _____________ object can be created either by using its constructor or creating a reference tho the DefauleView property of the DataTable.
1.      DataReader
2.      DataView
3.      OrclDataReader
3.
The __________ class provides properties and methods to work the schema information returned in a DataTable.
1.      SqlDataReader
2.      DataSet
3.      CommandBehaivior
4.
The InvalidOperationException and IndexOutOfRangeException can be handled through _______________ .
1.      DataReader class
2.      Try-catch bloacks
3.      DBNull() method
5.
Which of the following are the features of ADO.NET?
1.      It helps to create, use and manipulate data easily.
2.      it enables to connect to the RDBMS.
3.      it does not support XML.
4.      It enables to work with disconnected data.
5.      It exists only in the form of collections.

A. 1, 3, 4
B. 2, 4, 5
C. 1, 2, 4
D. 3, 4 ,5
6.
This parameter is used to set the value of parameter in a query base on a client-side cookies value that is passed as part of an HTTP request.
1.      Session
2.      QueryString
3.      Cookie
4.      Form
5.      Control
7.
This indicates the logical layout of a web site and is useful in navidation. It can be represented as breadcrumbs on individual Web page. It is created by ASP.NET and stored as XML file.
1.      Web.config
2.      SiteMap
3.      SiteMapDataSource
8.
Specifies or retrieves the type of expiration policy used to invaliedate a cache item.
1.      CacheExpirationPolicy
2.      CacheExpiration
Enablecaching: retrieves Boolean value indicating caching is enabled or not
DataSourceMode: retrieves a value indicating the retrieval mode used to fetch data
CacheDuration: retrieves the time in seconds for which the controls caches the data
SqlCacheDependency: retrieves database entry-table value pairs.
9.
The SqlDataSource control allows you to retrieve data and modify in the MS SQL Server databases, OLEDB databases as well as ODBC or Oracle databases.
1.      True
2.      False
10.
This Sets or Gets the URL of a node in the site map, which will be used by the data source control to build the site map structure.
1.      StartNodeUrl
2.      StartingNodeUrl
3.      ShowStartingNode // if the start node is displayed or not
4.      StartFromCurrentNode // if the site map node tree is retrieved using the node represented by the current page or not
 Đề thi lý thuyết DHA....
***
1. Objects associated with ADO.NET technology are:
[a] Connection
[b] DataSet
[c] Command
[d] T-SQL
[e] Binding Source Component

2. There are two types of Dataset:
[a] Typed Dataset
[b] XML Dataset
[c] Untyped Dataset
[d] Complex Dataset

3. The RepeatDirection property of DataList specifies whether the display of records will be repeated. There are two optopns:
[a] Horizontal
[b] Vertical
[c] Table
[d] Flow

4. Select correct statements about DataReader and SqlDataReader:
1. DataReader object do not support paging or sorting functionality
2. Forward-only and Read-only
3. The SqlDataReader class is defined in the System.Data.Sql namespace

5. We can use the ………. property to check if a SqlDataReader has any rows.
[a] HasRows
[b] HasRow
[c] Read
[d] Next
6. DataSet class provides three XML-based methods namely: (Choose 3)
[a] ReadXml()
[b] WriteXml()
[c] GetXml()
[d] SetXml()
[e] FindXml()
7. There are some types of Cache Location in Page Output Caching. These are:
[a] None
[b] Client
[c] Server
[d] Any
[e] ServerAndClient
[f] Downstream
[g] All of these


8. Which of the following Web site cannot be created in the IDE?

1. File System Web sites
2. Local IIS Web sites
3. Remote Web site
4. FTP Web site

1, 2, 3
2, 3, 4
1, 2, 3, 4
None of the above.

9. Which of the following are the ways to access Web sites hosted on the IIS?
1. Specifying the IP address
2. Specifying local host with optional port number
3. Specifying IIS name
4. Specifying the machine name

1, 2, 3
2, 3, 4
1, 2, 4
1, 2, 3, 4


10.Which of the following attribute of the @ Register directive specifies an alias that provides a link with the namespace?

src
tagname
tagprefix
tagspace

11. Action events are control events that are executed when the Web page is requested for the next time.

TRUE
FALSE

12. Which of the following property of the RadioButtonList control specifies the number of pixels between the border and the contents of the table?


CellPadding property
CellSpacing property
TextAlign property

13. The ____________________property specifies or retrieves the text between the opening and closing tags of the specified server control.

Style
InnerText
Target
Enctype

14.The Request Cookies Collection section of Trace class displays the cookies that are passed during the page request.

TRUE
FALSE

15.The ______________________________represents the ODBC.NET data provider.

System.Data.Odbc namespace
Oracle.Data.Odbc namespace
.NET Framework
ODP.NET


16.Which of the following methods are provided by the DataSet class?

1. HasChanges()

2. GetChanges()
3. AddChanges()

1, 2
2, 3
1, 3
1, 2, 3

17.Which of the following class provides IsDBNull() and NextResult() methods?

IndexOutOfRangeException
SqlDataReader
CommonDataReader

18. The XmlDataSource control is used to display XML data in a data-bound control such as GridView.
TRUE
FALSE

19. Which property of the SiteMapPath control is used to change the order in which the links appear?

1)PathDirect
2)Direction
3)PathDirection

20.Which property of the SiteMapPath control is used for all nodes displayed?

1)CurrentNodeStyle
2)RootNodeStyle
3)NodeStyle
4)PathSeparatorStyle
1
1, 3
2
2, 3
3
All of the above

21. The Menu control supports which of the following templates?
1)StaticMenuItemTemplate
2)DynamicMenuItemTemplate
3)DynamicTemplate


Không có nhận xét nào:

Đăng nhận xét