You are designing a Web site that is used by your suppliers to quote their
pricing for a product that your company will buy over the next quarter. The Web site will
use data to calculate the best possible purchase options. Your application displays three
text boxes to the suppliers. The first text box (txtPrevQtrMax) enalbles suppliers to enter
the maximum value charged by them for this product in the previous quarter. The second
text box (txtPrevQtrMin) enables suppliers to enter the minimum value charged by them
in the previous quarter. The third text box (txtQuote) enables suppliers to enter the
proposed pricing of the product for the next quarter. You want suppliers to restrict the
value of the txtQuote field between txtPrevQtrMin and txtPrevQtrMax. The validaton
technique you use should utilize the minimum amount of code.
Which of the following validation controls would you use to perform the validation?
A -
RegularExpressionValidator
B -
CompareValidator
C -
CustomValidator
D -
RangeValidator
2-
You are designing a Visual C# ASP.NET Web form with a variety of controls
on its user interface. Some controls will be infrequently used. For these controls, you do
not want the user to be able to tab into the control, but the user should still be able to
activate the control by clicking in it.
Which of the following options should you use?
A -
Set the TabIndex property of the control to 0.
B -
Set the AccessKey property of the control to null.
C -
Set the Enabled property of the control to false.
D -
Set the TabIndex property of the control to -1
3-
You are a developer working on an application for a corporate intranet. This
application has existing ASP pages and is mixing new code with ASP.NET pages. One of
the ASP pages has to submit to your page for processing. The form uses the Post method.
How would you read the value for a field called "Address" that wa posted from the ASP
page?
You are developing an online checkbox application. Currently, the application
plays a music file when the checkbox is in balance. Which of these modifications would
make the application more accessible?
A -
Allow the user to set the volume of the music played when the checkbook is in balance Display a check mark graphic when the checkbook is in balance.
B -
Add a message box that is also displayed when the checkbox is in balance Display a check mark graphic when the checkbook is in balance.
C -
Allow the user to select a custom music file to play when the checkbook is in balance Display a check mark graphic when the checkbook is in balance.
D -
Allow the user to set the volume of the music played when the checkbook is in balance Add a message box that is also displayed when the checkbox is in balance.
5-
You are a developer working on a corporate intranet. You are working on a
page that accesses content from the database that will rarely change. You want to have
the browser keep a copy of the page an hour in order to reduce database traffic.
How would you accomplish this in code this page?
A -
Response.Cookies.Expires = 60;
B -
Response.Expires = 60;
C -
Request.Expires = 60;
D -
Page.Expires = 60;
6-
You are working for an online book retailer. Recently your company has
created a points system for sites that link to your home page. Every time you get a hit you
add a point to the customers record. Points can be redeemed for discounts on
merchandise.
You have to add code to the home page to capture the page that is linked to your site.
What is the best way to accomplish this?
A -
String sRefPage = Request.Url:
B -
String sRefPage = Page.GetLinkedUrl():
C -
String sRefPage = Request.UrlReferrer:
D -
String sRefPage = Page.Referrer:
7-
You are working on an application that registers over the Internet for a charity
auction. The page contains a drop down of items that are up for auction. Users who
register are supposed to select the item they are most interested in.
The list of auction items is contained in an XML file called AuctionItems.xml and is in
the same directory as the registration page.
How would you find the physical path to this file so that your page can open it?
A -
String sPath = Server VirtualPath("AuctionItems xml"):
You are currently developing a file access assembly for your companys Web
site. One of the methods in the assembly is called "GetFile", which has a string filepath
parameter and returns a StreamReader.
You need to raise an IOException if an invalid path is speccified in the filepath
parameter.
How do you raise the exception in your code?r
A -
throw new IOException("Invalid path"):
B -
raise new IOException("Invalid path"):
C -
IOException exception = new IOException("Invalid path"): Excetion.Raise():
D -
IOException.Throw("Invalid path")
9-
You are creating a shopping cart application for HUI. The application loads the
category and product data only once in each users session.
You create two DataTable objects. One DataTable object is named Categories, and the
other DataTable object is named Products. The Categories object remains static, but the
Products object is modified when the user selects products and enters quantities to
purchase.
You want to minimize the time it takes the page to reload after each change
You are developing a cheduling application for your companys intranet. You
are using a Calender control to enable ealy and correct selection of dates. You want to
mark holidays on the calender so that users are aware of them while creating a schedule.
For example, January 1 should be marked as New Years Day. You want to display the
description of the holiday in the same cell that displays the date. Which of the following
calender events would you use to achieve this?