You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following code fragment: You write the following code segment in the code-behind file for the page: void BindData(object sender, EventArgs e) { lstLanguages.DataSource = CultureInfo.GetCultures(CultureTypes.AllCultures); lstLanguages.DataTextField = "EnglishName"; lstLanguages.DataBind(); } You need to ensure that the lstLanguages ListBox control maintains the selection of the user during postback. Which line of code should you insert in the constructor of the page?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application uses Session objects. You are modifying the application to run on a Web farm. You need to ensure that the application can access the Session objects from all the servers in the Web farm. You also need to ensure that when any server in the Web farm restarts or stops responding, the Session objects are not lost. What should you do?()
You create a Microsoft ASP.NET AJAX application by using the Microsoft .NET Frameworkversion 3.5. You attach Microsoft Visual Studio 2008 debugger to the Microsoft Internet Explorer instance to debug the JavaScript code in the AJAX application. You need to ensure that the application displays the details of the client-side object on the debugger console. What should you do?()
You are creating an ASP.NET Web site. The site has a master page named Custom.master. The code-behind file for Custom.master contains the following code segment. You create a new ASP.NET page and specify Custom.master as its master page. You add a Label control named lblRegion to the new page. You need to display the value of the master page’s Region property in lblRegion. What should you do? ()
You are implementing an ASP.NET page. Client-side script requires data. Your application includes a class named Person with a Name property of type string. The code-behind file of the page includes the following code segment. You need to use the JavaScriptSerializer class to serialize only the Name property of each item in the people list. Which code segment should you use?()
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. What should you do?()
You are perfoming security testing on an existing asp.net web page.You notice that you are able to issue unauthorised postback requests to the page. You need to prevent unauthorised post back requests. which page directive you use?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. You create a page that contains the following control. You write the following code segment in the code-behind file for the page. Private Sub LoadDate(ByVal sender As Object, _ByVal e As EventArgs) If IsPostBack Then calBegin.SelectedDate = _ DirectCast(ViewState("date"), DateTime) End If End Sub Private Sub SaveDate(ByVal sender As Object, _ByVal e As EventArgs) ViewState("date") = calBegin.SelectedDate End Sub You need to ensure that the calBegin Calendar control maintains the selected date. Which code segment should you insert in the constructor of the page? ()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application resides on a server named ContosoTest that runs Microsoft IIS 5.0. You use a computer named ContosoDev to log on to the Contoso.com domain with an account named ContosoUser. The ContosoTest and ContosoDev servers are members of the Contoso.com domain. You need to set up the appropriate permission for remote debugging. What should you do?()
You create a Microsoft ASP.NET application by using the Microsoft .NET Framework version 3.5. The application runs on Microsoft IIS 6.0. You create a page named oldPage.aspx. You need to ensure that the following requirements are met when a user attempts to access the page: ¡;¤The browser diplays the URL of the oldPage.aspx page. ¡;¤The browser displays the page named newPage.aspx Which code segment should you use?()