JULY's Personal Webpage

Thế giới vốn không công bằng … hãy thích nghi với chúng!!!

123

Posted by JULY on October 28, 2009

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

D.    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

B.    connectionStrings

  1. connectionTyp
  2. connection

 

5. Which approach specifies the location of output cache using the Location attribute of @OutputCache directive?

  1. parameterized approach
  2. Substitution approach

C.    Declarative approach

  1. 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. A TableAdapter 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?

A.    One

B.    Two

C.    Depends on the number of pages in the application

  1. Zero

 

9. A user control is cached by including an ……. directive in the .ascx file of  control?

  1. @Cache

B.    @OutputCache

  1. @Register
  2. @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 <SelectParameters> and <DelectParameters> .

 

  1.  
    1. Only 1
    2. Only 2

C.    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. <Caching>

            <sqlCacheDependency enabled =”true” pollTime=”420000″>

              <databases>

     B.  <Caching>

              <sqlCacheDependency enabled =”true” pollTime=”7″>

                <databases>

     C.   <Caching>

              <sqlCacheDependency enabled =”true” pollTime=”42000″>

                <databases connectionStringName=”Eudora”/ >

      D.  <Caching>

              <sqlCacheDependency enabled =”true” pollTime=”420″>

                 <databases>

 

 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

D.    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

B.    ShowStartingNode

  1. StartingNodeUrl
  2. ShowStartNode

 

  15. ……………… represents a query or a command that is to be executed by a data source

  1. Connection

B.    Command

  1. DataSet
  2. 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

D.    ObjectList

 

   17. ……. is a group of class that enables the developers to connect to RDBMS

A.    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

D.    DataColumnCollection

 

   20. Which of the following classes stores the frequently used application for a Web application ?

  1. System.Web.Cache

B.    System.Web.Caching.Cache

  1. System.Web.Caching
  2. System.Cache

 

   21. Which of the following are the new features provided in ASP.NET 2.0 ?

  1.  
    1. Control that access data from the backend 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. B.    1 3
  3. All of the above.

C.    2 3

 

   22. Which property of the GridView control regarding paging functionlity indicates whether the paging buttons are displayed ?

  1. PagerSettings.PreviousPageText

B.    PagerSettings.Visible

  1. PagerSettings.Mode
  2. 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

C.    Data binding

  1. 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//dung
  2. DeletingCommand//sai. Dung la DeleteCommand

C.    UpdateCommand//dung

D.    CancellingCommand//sai. Dung la CancelCommand

  1. EditCommand//dung

 

    26. Which event is raised when each item in a mobile List control is being data bound ?

  1. ItemDataBound
  2. DataItemBind
  3. ListItem

D.    ItemDataBind

//Xem lai cau nay

    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

D.    VaryByCustom

 

   28. The…..object is used to fetch and update the data from the database.

A.    DataSet

  1. Data adapter
  2. DataTable
  3. DataColumn

 

//Xem

   29. The …. data source control enables you to  work with ASP.NET site navigation through XML-based site maps.

 

  1. SqlDataSource
  2. XmlDataSource

C.    SiteMapDataSource

  1. 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 .

A.    untyped

  1. typed
  2. row
  3. 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 manupulate ?

A.    DataView

  1. GridView
  2. DataList
  3. 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

C.    1 2

  1.  
    1. All of the above

 

 

 

Posted in Uncategorized | Leave a Comment »

Protected: 3

Posted by JULY on October 27, 2009

This post is password protected. To view it please enter your password below:


Posted in Uncategorized | Enter your password to view comments

Protected: 2

Posted by JULY on October 27, 2009

This post is password protected. To view it please enter your password below:


Posted in Uncategorized | Enter your password to view comments

Protected: a

Posted by JULY on October 27, 2009

This post is password protected. To view it please enter your password below:


Posted in Uncategorized | Enter your password to view comments

sdfsdf

Posted by JULY on October 16, 2009

1.    Which the following statements about ASP.NET directives are correct ?


a.    The @Page directive associates a page or control to the current page.


b.    The @Master directive defines attributes for a web page saved as .aspx.


c.    The @Import directive imports a namespace which helps to include classes and interfaces.


d.    The @Assembly directive associates an assembly to a page or any control.


2.    Which the following statements about HtmlImage control properties are correct ?


a.    The Align property retrieves the alignment of the image in relation to other controls on the web page.


b.    The SRC property specifies the text to be displayed when an image is not displayed on the web page.


c.    The ID property specifies or retrieves the identifier that is assigned to the image on the server control.


d.    The Alt property specifies the height and width of the image to be displayed on the web page.


3.    Which the following statements about the BaseValidator class properties are correct ?


a.    The ControlToValidate property specifies whether the related input control is validated.


b.    The display property retrieves the identifier of the input Web server control to be validated.


c.    The ErrorMessage property specifies the error message text to be displayed when validation is not performed.


d.    The isValid property specifies the behavior of the error message to be displayed in a validation control.


4.    Which the following statements about Debugging are correct ?


a.    Debugging is a process wherein the errors in the application are located and eliminated.


b.    Debug Listeners are classes used to collect, store, display, and route the trace debug messages.


c.    The Watch window, under the debug menu, is used to add and manipulate debuggers.


d.    A breakpoint is a point in the source code at which the application execution stars debugging.


5.    Which of the following technologies are ASP based on ?


a.    Component Object Model


b.    Document Object Model


c.    Open Service Interface Definitions


d.    Win32 Application Program Interface


6.    Which of following statements about IIS are correct?


a.    IIS fails when it comes to provide scalability or addition of more systems without loss of performance.


b.    IIS provides an application isolation environment which allows each Web application to function individually.


c.    IIS provides advanced authentication and authorization features to protect the system from unauthorized access.


d.    IIS provides the IIS Manager that does not allow users to configure the IIS according to their personal needs.


7.    Which of the following are latest features of Visual Studio 2005 IDE’s Web development environment?


a.    Improved Code Behind Model


b.    Simplified Web Page Designing


c.    Secure Web Site Publishing


d.    Visual Web Developer.


8.    Which of the following statements related to the ASP.NET Web Page Code Model are correct?


a.    Smart navigation feature retains the focus for an element or control even when the Web page is refreshed.


b.    Unlike single-file page model files. Code-behind page model files only derive event handlers from the page class.


c.    Markup files are saved with extension .aspx while the class files are saved with the extension .aspx.cs.


d.    The single-file and code-behind page models exhibit different page directive, script code, and user interface code layout.


9.    Which of the following statements about HttpRequest class properties are correct?


a.    The ApplicationPath property retrieves the client’s browser attributes such as its name.


b.    The ContentLength property specifies the length of the entire client request content.


c.    The FilePath property retrieves the virtual path of the page requested by the browser.


d.    The QueryString property retrieves the HTTP data transfer method used by the client.


10.  Which one of the following codes retrieves and displays the length of the client request ?


a.    Response.Write(“Content Length : “ + Response.Length);


b.    Response.Write(“Content Length : “ + Server.ContentLength);


c.    Request.Write(“Content Length : ” + Response.ContentLength);


d.    Response.Write(“Content Length : “ + Request.ContentLength);


11.  You want to create a calendar that will allow the user to select either a single day or select an entire week ? Which one of the following code will help you to achieve this ?


a.    Calendar calCompany = new Calendar(); calCompany.SelectionMode = CalendarSelectionMode.Day;


b.    Calendar calCompany = new Calendar(); calCompany.SelectionMode = CalendarSelectionMode.Week;


c.    Calendar calCompany = new Calendar(); calCompany.Selection = CalendarSelection.DayWeek;


d.    Calendar calCompany = new Calendar(); calCompany.SelectionMode = CalendarSelectionMode.DayWeek;


12.  The base class of the checkbox Web Server control is _______.


a.    System.Web.UI.WebControls


b.    System.Web.UI.WebControls.CheckBox


c.    System.Web.UI.WebControls.ListControl


d.    System.Web.UI.WebControls.CheckBoxList.


13.  Which one of the following codes will create a menu named , mnuCollege, at runtime and will add an item named, mnuitemCourses, to it?


a.    Menu mnuCollege = new Menu(); MenuItem mnuitemCourses = new MenuItem(“Courses”); mnuCompany.Items.Append(mnuitemCourses);


b.    Menu mnuCollege = new Menu(); MenuItem mnuitemCourses = new MenuItem(“Courses”); mnuCompany.Items.Add(mnuitemCourses);


c.    Menu mnuCollege = new Menu(); MenuItem mnuitemCourses = new MenuItem(“Courses”); mnuCompany.Items.Insert(mnuitemCourses);


d.    Menu mnuCollege = new Menu(); MenuItem mnuitemCourses = new MenuItem(“Courses”); mnuCompany.Items.Modify(mnuitemCourses);


14.  Which one of the following codes allows quick navigation to the region by pressing ALT key and the access key, “F”?


a.    phspotItem.ShortcutKey = “F”;


b.    phspotItem.AccessKey = “F”;


c.    phspotItem.Navigate = “F”;


d.    phspotItem.PostBackValue = “F”;


15.  Which one of the following codes activates the first vies control ?


a.    mvwBookList.ActiveViewIndex = 1;


b.    mvwBookList.ActiveView = 0;


c.    mvwBookList.ActiveView = 1;


d.    mvwBookList.ActiveViewIndex = 0;


16.  Which one of the following codes sets the Method property of the html form, hfrmInvoiceDetails, to Post for submitting form data information to the server?


a.    hfrmInvoiceDetails.assignMethod = “POST”;


b.    hfrmInvoiceDetails.Method = “POST”;


c.    hfrmInvoiceDetails.setMethod = “POST”;


d.    hfrmInvoiceDetails.MethodValue = “POST”;


17.  Suppose a ValidationSummary control, valsEmployeeDetails, has a property EnableClientScript. Which one of the following codes will restrict the user to access client scripting?


a.    valsEmployeeDetails.EnableClientScript = false;


b.    valsEmployeeDetails.EnableClientScript = null;


c.    EnableClientScript.valsEmployeeDetails = false;


d.    EnableClientScript.valsEmployeeDetails = null;


18.  Suppose the Application variable UserName has the value Anna, and the user wants to provide access to the first Application object. Which one of the following codes will help you to achieve this task?


a.    Application[“UserName”] = “Anna”; Response.Write(“UserName is : “ + ApplicationItems[0]);


b.    Application[“UserName”] = “Anna”; Response.Write(“UserName is : “ + ApplicationItem[1]);


c.    Application[“UserName”] = “Anna”; Response.Write(“UserName is : “ + Applications[1]);


d.    Application[“UserName”] = “Anna”; Response.Write(“UserName is : “ + Applications[0]);


19.  Which one of the following classes in the System.Web.Mobile namespace contains the device filters collection to be included in the mobile Web application?


a.    DeviceFilterElement


b.    DeviceFiltersSection


c.    MobileCapabilities


d.    DeviceFilters


20.  Suppose the user wants to trace a page, display the tracing information by collecting the trace information for 5 requests. Which one of the following code helps you to achieve this task?


a.    <enable=”true” Output=”true” requestLimit= “5”/>


b.    <trace enable=”true” pageOutput=”true” requestLimit=”5”/>


c.    <trace enable=“true” pageOutput=”true” limit=”5”/>


d.    <trace enable=”true” display=”true” request=”5”/>


21.  Which of the following statements about Selection Web Server Controls are correct?


a.    The CheckBox control is used to create a group of check box controls.


b.    The RadioButton control is used to create a group of radio buttons.


c.    The DropDownList control is used to create a drop-down list.


d.    The ListBox control allows the user to select multiple items from a list.


22.  Which of the following statements about the Calendar and AdRotator controls are correct?


a.    The Calendar control displays a single-month calendar and allows the user to select dates.


b.    The AdRotator control is used to rotate the selected banner advertisements sequentially.


c.    The TodaysDate property specifies or retrieves the date that is selected.


d.    The Impressions element specifies the number of the ads and their of rolation.


23.  Which of the following statements about the ImageMap class properties are correct?


a.    The HotSpotMode property retrieves the mode of a collection of HotSpot objects.


b.    The ImageUrl property retrieves the location of an image to display in the image control.


c.    The AlternateText property retrieves alternate text when the Image is unavailable.


d.    The HotSpots property specifies or retrieves the behavior for the HotSpot object.


24.  Which of the following statements about the HTML server input controls are correct?


A.    The HtmlInputText control allows the developer to create a single line textbox to accept user input.


B.    The HtmlInputCheckBox control allows the developer to access the <input> HTML element.


C.   The HtmlInputImage control allows the developer to create a button that displays an image on the Web form.


D.   The HtmlInputButton control creates a button that the form submits, resets or simply pushes.


a.    B


b.    A, B


c.    C, D


d.    A, C


25.  Which of the following statements about Tracing are correct?


A.    Tracing in ASP.NET refers to the process of monitoring the execution of ASP.NET Web applications.


B.    Application-level tracing can be enable by enabling the @Page directive in the required Web pages.


C.   The <trace> tag is added to the Web.Config file to enable page-level tracing within Web applications.


D.   While enabling tracing, opening and closing tags for <system.Web> are added within the <configuration> tag.


a.    B, C//cau nay sai


b.    A, B, C


c.    C, D


d.    A, D


26.  Which of the following statements about the Lock and Unlock methods are correct?


a.    The Lock method prevents other users from altering the variables stored in the Application object.


b.    The Unlock method blocks attempts by other worker threads to access anything in application state.


c.    Only the thread that invoked Lock method can unblock the application object by calling UnLock() method.


d.    The .NET Framework does not remove a lock even if the request completes, times out, or fails.


27.  Which of the following statements related to ASP.NET are correct?


a.    A Web Form refers to a group of servers that host the same site.


b.    A memory leak is a bug that prevents a program from allocating memory.


c.    Caching refers to the process of storing a copy of an accessed image or page.


d.    The WYSIWYG editor allows developers to drag and drop controls onto a Web Form.


28.  Which of the following statements about WebControls class properties are correct?


a.    The BackColor property specifies the background color of the Web server control.


b.    The ForeColor property retrieves the foreground color of the Web server control.


c.    The Width property specifies or retrieves the width of the Web server control.


d.    The Visible property specifies or determines whether the Web server is executing or not.


29.  Which of the following statements about Navigation Web Controls are correct?


a.    Menu, TreeViewMap and SiteMap are navigation controls provided by ASP.NET.


b.    An XML menu file can be linked to a Menu control and be used as an internally coded menu.


c.    A tree view can be considered as an expanding and contracting menu.


d.    The FindNode method is an important method of the TreeView control.


30.  Which of the following statements about the various validation controls are correct?


a.    CompareValidator evaluates input value to check whether it is valid as per specified logic.


b.    RangeValidator checks whether the input value is within the specified range limit.


c.    RegularExpressionValidator checks whether the input value is in the specified format.


d.    RequiredFieldValidator ensures that the input control is not left blank by the user.


31.  Which of the following statements about the System.Web.Mobile namespace classes are correct?


a.    The CookielessData class is used to store and retrieve session information from devices.


b.    The MobilesCapabilities class specifies the capability information about a client mobile device.


c.    The DeviceFilterElement class specifies a filter to be applied to the mobile Web application.


d.    The DeviceFiltersSection class contains filters which can be applied to mobile Web applications.


32.  Which of the following statements about Web server controls are correct?


a.    The Label control is used to display text on the mobile form.


b.    The link control is used to create hyperlinks on the mobile devices.


c.    The List control displays items as a list and provides easy navigation.


d.    The TextBox control is used to represent a phone number that is to be called.


33.  Which one of the following project files in the Web Form application contains the links (URLs) to provide information about the XML Web service?


a.    Projectname.vsdisco


b.    AssemblyInfo.cs


c.    Default.aspx


d.    Default.aspx.cs


34.  Which of the following codes removes the application variable at index 0?


a.    Application.Remove(0);


b.    Application.RemoveAt(0);


c.    Application.RemoveAll(0);


d.    Application.DeleteAt(0);


35.  Which of the following statements about HttpResponse class properties are correct?


a.    The BufferOutput property helps to specify whether the HTTP request output is buffered.


b.    The ContentEncoding property specifies or retrieves the HTTP character set of the response.


c.    The ContentType property retrieves cookies to be transmitted to the client in the response.


d.    The IsClientConnected property helps to specify whether the client is connected to the server.

Posted in Uncategorized | Leave a Comment »