Dot NET Quiz – 1

31 10 2008

You create an ASP.NET application for TestKing Motors. The application allows 
users to purchase automobile insurance policies online. A page named 
InsuredAuto.aspx is used to gather information about the vehicle being insured. 
InsuredAuto.aspx contains a TextBox control named vehicleIDNumber. The user 
enters the vehicle identification number (VIN) of the vehicle into 
vehicleIDNumber and then clicks a
button to submit the page. The Button control is named submitButton. Upon 
submission of the
page, additional vehicle information is obtained for the VIN, and the page is 
redisplayed for showing the vehicle information. You define vehicleIDNumber by 
using the following HTML tag:
<asp:TextBox id=vehicleIDNumber runat=server
EnableViewState=True/>
Valid VINs are composed of numbers and uppercase letters. You need to include 
code that
converts any lowercase letters to uppercase letters so that the properly 
formatted VIN is
displayed after the page is submitted and redisplayed.
What are two possible ways to achieve this goal?

A. Add the following code to the vehicleIDNumber.TextChanged event handler for
InsuredAuto.aspx:
vehicleIDNumber.Text = vehicleIDNumber.Text.ToUpper();

B. Add the following code to the submitButton.Click event handler for 
InsuredAuto.aspx:
vehcicleIDNumber.Text = vehicleIDNumber.Text.ToUpper();

C. Add the following code to the Page.Init event handler for InsuredAuto.aspx:
vehicleIDNumber.Text = vehicleIDNumber.Text.ToUpper();

D. Add the following code to the Page.Render event handler for InsuredAuto.aspx:
vehicleIDNumber.Text = vehicleIDNumber.Text.ToUpper();

Options:

I.     C,D
II.    A,B
III.   D,B
IV.    A,C

Advertisements

Actions

Information

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s




%d bloggers like this: