Microsoft UPGRADE: MCAD Skills to MCTS Web Apps Using MS.NET Framework Sample Questions:
1. You have just graduated from college, now you are serving the internship as the software developer in an international company. According to the requirements of the company CIO, you create a Web application for the company's intranet. The company wants to enable users to customize their versions of the intranet home page. You create sections of content as Web Parts. You need to ensure that users can customize content at any time. In the options below, which code segment should you use?( choose more than one)
A) <asp:CatalogZone ID="CatalogZone1" Runat="server"> <ZoneTemplate> <asp:PageCatalogPart Runat="server" ID="PageCatalogPart1" /> </ZoneTemplate></asp:CatalogZone>
B) <asp:ConnectionsZone ID="ConnectionsZone1" Runat="server"> <ConnectVerb Enabled="true" /></asp:ConnectionsZone>
C) <asp:WebPartZone ID="WebPartZone1" Runat="server"> <ZoneTemplate> </ZoneTemplate></asp:WebPartZone>
D) <asp:ProxyWebPartManager ID="ProxyWebPartmanager1" Runat="server" />
2. You work as the developer in an IT company. Recently your company has a big customer. The customer is a large international compay. You're appointed to provide technical support for the customer. Now according to the customer requirement, you're creating a Web application which displays data by using a GridView control. For the Web application, you drag and drop tables from the Data Connections tree in Server Explorer build Web Forms.
The following is the Add Connection dialog box. (Click the Exhibit button.) You have to use this to add a connection to your data. You have to create the data source objects, so you need to configure the .NET Data Provider that you use to achieve this.
What should you do?
A) You should click the Advanced button, and change the Application Name property to the target provider.
B) You should click the Change button, and change the data provider for the selected data source.
C) You should right-click the connection, and click Properties. Modify the Provider property of the data connection.
D) You should click the Advanced button, and change the Data Source property to the target provider.
3. You have just graduated from college,now you are serving the internship as the software developer in an international company. According to the requirements of the company CIO, a Queue named q has to be created. So you have to create a method to achieve this. Which code segment should you use?
A) q.Dequeue()
B) q.Clear()
C) Dim e As ObjectFor Each e In qq.Dequeue()Next
D) Dim e As ObjectFor Each e In qq.Enqueue(Nothing)Next
4. You work as the developer in an IT company. Recently your company has a big customer. The customer runs a large supermarket chain. You're appointed to provide technical support for the customer. Now according to the customer requirement, you're developing a Web application. The Web application contains two distinct UIs, one is targeted to mobile devices which might or might not support cookies and relative URLs, another to desktop browsers. Users request the Default.aspx page. You have to redirect users to the appropriate UI, on the basis that whether they are using a mobile device or a desktop browser. What should you do?
A) Add the following code segment to the Page_Load event of Default.aspx. if (Request.Browser["IsMobileDevice"] == "true" ) { Response.Redirect("MobileDefault.aspx");} else { Response.Redirect("DesktopDefault.aspx");}
B) Add the following node to the <system.web> element of the Web.config file. <httpRuntime useFullyQualifiedRedirectUrl="true" />
C) Add the following node to the <system.web> element of the Web.config file. <httpRuntime useFullyQualifiedRedirectUrl="false" />
D) Add the following code segment to the Page_Load event of Default.aspx. if (Request.Browser.Type == "MobileDevice") { Response.Redirect("MobileDefault.aspx");} else { Response.Redirect("DesktopDefault.aspx");}
5. You work as the developer in an IT company. Recently your company has a big client. The client runs a large supermarket chain. Your company appoints you to serve the client. Now you are examining the output of a method that returns a string by using the Microsoft Visual Studio 2005 IDE. You assign the output to a string variable named fName.
Now you have to write a code segment that prints the following on a single line. Besdes this, the code segment must simultaneously facilitates uninterrupted execution of the application.
The message: "Test Failed: "
The value of fName if the value of fName does not equal "John"
In the options below, which code segment should you use?
A) if (fName != "John") { Debug.Print("Test Failed: "); Debug.Print(fName); }
B) if (fName != "John") { Debug.WriteLine("Test Failed: "); Debug.WriteLine(fName);
}
C) Debug.Assert(fName == "John", "Test Failed: ", fName);
D) Debug.WriteLineIf(fName != "John", fName, "Test Failed");
Solutions:
| Question # 1 Answer: A,C | Question # 2 Answer: B | Question # 3 Answer: B | Question # 4 Answer: A,B | Question # 5 Answer: D |
We're so confident of our products that we provide no hassle product exchange.


By Moore

