Web Developer Framework 4.0 Sample Questions – 18

Question: You are debugging an ASP.NET Web page. The page includes the following method. [WebMethod] public string GetServerString() {& } The page also includes the following markup. <asp:ScriptManager ID=”sm1″ runat=”server” /> The following JavaScript code is used to call the GetServerString method. function GetString() { PageMethods.GetServerString(callbackMethod); } function callbackMethod(str) {&… Continue reading

Web Developer Framework 4.0 Sample Questions – 17

Question: You are developing an ASP.NET templated server control. You need to ensure that a new ID namespace is created within the page control hierarchy when the control is added to a page. Which interface should you implement on the control? IDataItemContainer INamingContainer IDataKeysControl IExtenderControl Correct Answer: 2 Question: You… Continue reading

Web Developer Framework 4.0 Sample Questions – 16

Question: You are developing an ASP.NET Web application. The application will contain a page that is customized for various browsers. The application will use output caching to optimize performance. You need to ensure that the page is cached by browser type and major version only. Which attribute should you add… Continue reading

Web Developer Framework 4.0 Sample Questions – 15

Question: You are implementing an ASP.NET MVC 2 Web application that contains several folders. The Views/Shared/DisplayTemplates folder contains a templated helper named Score.ascx that performs custom formatting of integer values. The Models folder contains a class named Player with the following definition. public class Player { public String Name {… Continue reading

Web Developer Framework 4.0 Sample Questions – 14

Question: You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/{country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contain an unrecognized country value will not be processed by the Details action of… Continue reading

Web Developer Framework 4.0 Sample Questions – 13

Question: You are implementing an ASP.NET MVC 2 Web application. The URL with path /Home/Details/{country} will return a page that provides information about the named country. You need to ensure that requests for this URL that contain an unrecognized country value will not be processed by the Details action of HomeController…. Continue reading

Web Developer Framework 4.0 Sample Questions – 12

Question: You are implementing a WCF service library. You add a new code file that contains the following code segment. namespace ContosoWCF {[ServiceContract]public interface IRateService{[OperationContract]decimal GetCurrentRate();} public partial class RateService : IRateService{public decimal GetCurrentRate(){decimal currentRate = GetRateFromDatabase();return currentRate;}} } You build the service library and deploy its assembly to an IIS… Continue reading

Web Developer Framework 4.0 Sample Questions – 11

Question: You are implementing an ASP.NET page. You add and configure the following ObjectDataSource. <asp:ObjectDataSource SelectMethod=”GetProductByProductId”ID=”odc” runat=”server” TypeName=”ProductDAL”><SelectParameters><asp:Parameter Name=”productId” Type=”Int32″ /></SelectParameters> </asp:ObjectDataSource> The page will be called with a query string field named pid. You need to configure the ObjectDataSource control to pass the value of the pid field to GetProductsByProductId… Continue reading

Web Developer Framework 4.0 Sample Questions – 10

Question: You are deploying an ASP.NET Web application to a remote server. You need to choose a deployment method that will ensure that all IIS settings, in addition to the Web content, will deploy to the remote server. Which deployment method should you choose? the XCOPY command-line tool the Copy… Continue reading

Web Developer Framework 4.0 Sample Questions – 9

Question: You create a Visual Studio 2010 solution that includes a WCF service project and an ASP.NET project. The service includes a method named GetPeople that takes no arguments and returns an array of Person objects. The ASP.NET application uses a proxy class to access the service. You use the Add… Continue reading