070-515 無料問題集「Microsoft TS: Web Applications Development with Microsoft .NET Framework 4」
You are developing an ASP.NET Web page. You add the following 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 correct answer presents part of the solution. Choose two.)
<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 correct answer presents part of the solution. Choose two.)
正解:A、B
解答を投票する
You are implementing a read-only page that includes the following controls.
<asp:Button ID="btnRefresh" runat="server" Text="Button" /> <asp:GridView ID="gvCustomers" runat="server" EnableViewState="False" OnDataBinding="gvCustomers_DataBinding"></asp:GridView>
You disable view state to improve performance.
You need to ensure that the page is updated to display the latest data when the user clicks the refresh
button.
Which code segment should you use?
<asp:Button ID="btnRefresh" runat="server" Text="Button" /> <asp:GridView ID="gvCustomers" runat="server" EnableViewState="False" OnDataBinding="gvCustomers_DataBinding"></asp:GridView>
You disable view state to improve performance.
You need to ensure that the page is updated to display the latest data when the user clicks the refresh
button.
Which code segment should you use?
正解:B
解答を投票する
You are building an ASP.NET control.
The control displays data by using a table element with a class attribute value of Results.
The control should expose a client-side event named onrowselected that fires when a check box in a
table row is selected.
You need to implement this client-side event.
What should you do?
The control displays data by using a table element with a class attribute value of Results.
The control should expose a client-side event named onrowselected that fires when a check box in a
table row is selected.
You need to implement this client-side event.
What should you do?
正解:B
解答を投票する
You are implementing an ASP.NET AJAX page. You add the following control to the page.
<asp:UpdatePanel ID="pnl1" runat="server" UpdateMode="Conditional"> <ContentTemplate> ... </ContentTemplate> </asp:UpdatePanel>
You need update the contents of the UpdatePanel without causing a full reload of the page.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
<asp:UpdatePanel ID="pnl1" runat="server" UpdateMode="Conditional"> <ContentTemplate> ... </ContentTemplate> </asp:UpdatePanel>
You need update the contents of the UpdatePanel without causing a full reload of the page.
Which two actions should you perform? (Each correct answer presents part of the solution. Choose two.)
正解:A、D
解答を投票する
解説: (JPNTest メンバーにのみ表示されます)
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?
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?
正解:C
解答を投票する