Question
Drag and Drop
You are developing an ASP.NET MVC application in Visual Studio 2012. The application contains sensitive bank account data. The application contains a helper class named SensitiveData.Helpers.CustomEncryptor.
public class CustomEncryptor
{
The application contains a controller named BankAccountController with two actions{
public string Encrypt(string plaintext)
{
}
{
...
}
public class BankAccountController: Controller
{
The application contains a model named BankAccount which is defined in the following code segment.{
public ActionResult GetAcounts()
{
public ActionResult EditAccount (string maskedAccountNum)
{
}
{
...
}
public ActionResult EditAccount (string maskedAccountNum)
{
...
}
public class BankAccount
{
The application must not display AccountNumber in clear text in any URL. You need to build the view for the GetAccounts action.{
public string AccountNumber {get;set;}
public string AccountName {get;set;}
public double Balance {get;set;}
}
public string AccountName {get;set;}
public double Balance {get;set;}
How should you build the view? (To answer, drag the appropriate code segment to the correct location or locations. Each code segment may be used once, more than once, or not at all. You may need to drag the split bar between panes or scroll to view content.)
- custEncrypt
- maskedAccountNum
- Html
- Encrypt(item.AccountNumber)
- Encode(item.AccountNumber)
@model IEnumberable<SensitiveData.Models.GamerAccount>
<table>
<table>
<tr>
@foreach (var item in Model)
{
</table>
<th>Account Name</th>
<th>Balance</th>
</tr><th>Balance</th>
@foreach (var item in Model)
{
&tr>
}
<td>@Html.DisplayFor(modelItem => item.AccountName)</td>
<td>@Html.DisplayFor(modelItem => item.Highscore)</td>
<td>@Html.ActionLink("Edit","EditAccount", new {
</tr>
<td>@Html.DisplayFor(modelItem => item.Highscore)</td>
<td>@Html.ActionLink("Edit","EditAccount", new {