Which deployment method should you choose?
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?
You need to ensure that the connection string valuethat is stored in the web.config file is updated to the pro
You are preparing to deploy an ASP.NET application to a production server by publishing the application in
Release configuration.
You need to ensure that the connection string valuethat is stored in the web.config file is updated to the
production server’s connection string value during publishing.
What should you do?
Which GridView event should you handle?
You are implementing an ASP.NET application.
The application includes a Person class with property Age.
You add a page in which you get a list of Person objects and display the objects in a GridView control.
You need to add code so that the GridView row is highlighted in red if the age of the person is less than 18.
Which GridView event should you handle?
You need to ensure that the data can be viewed one page at a time
You are implementing an ASP.NET page that will retrieve large sets of data from a data source.
You add a ListView control and a DataPager control to the page.
You need to ensure that the data can be viewed one page at a time.
What should you do?
What are two possible ways to achieve this goal?
You create a page in an ASP.NET Web application.
The page retrieves and displays data from a Microsoft SQL Server database.
You need to create a data source that can connect to the database.
What are two possible ways to achieve this goal? (Each correct answer presents a complete solution. Choose
two.)
Which control should you add?
You are developing an ASP.NET Web application.
You create a master page.
The master page requires a region where you can addpage-specific content by using the ASP.NET page
designer.
You need to add a control to the master page to define the region.
Which control should you add?
Which two actions should you perform?
You are developing an ASP.NET Web page. You add thefollowing markup to the page.
<asp:FileUpload id=”FileUpload1″ runat=”server” />
<asp:Button id=”btnUpload” Text=”Upload selected file” OnClick=”btnUpload_Click”
runat=”server” />
<asp:Label id=”lblFeedback” runat=”server” />
You add the following code segment to the code-behind. (Line numbers are included for reference only.)
01 protected void btnUpload_Click(object sender, EventArgs e)
02 {
03 if (…)
04 {
05 string saveName = Path.Combine(@”c:\uploadedfiles\”, FileUpload1.
FileName);
06
07 lblFeedback.Text = “File successfully uploaded.”;
08 }
09 else
10 {
11 lblFeedback.Text = “File upload failed.”;
12 }
13 }
You need to save the uploaded file and display a message to the user that indicates that the upload either
succeeded or failed.
Which two actions should you perform? (Each correctanswer presents part of the solution. Choose two.)
Which ActionLink should you use?
You are developing an ASP.NET MVC 2 Web application.
The application contains a controller named HomeController, which has an action named Index.
The application also contains a separate area namedBlog.
A view within the Blog area must contain an ActionLink that will link to the Index action of the HomeController.
You need to ensure that the ActionLink in the Blog area links to the Index action of the HomeController.
Which ActionLink should you use?
Which code segment should you use?
You are developing an ASP.NET MVC 2 application.
A view contains a form that allows users to submit their first name.
You need to display the value that is submitted, and you must ensure that your code avoids cross-site scripting.
Which code segment should you use?
Which interface should you add the extension methodto?
You are developing an ASP.NET Web page that will display the median value from a sequence of integer
values.
You need to create an extension method to compute the median value.
Which interface should you add the extension methodto?