@model string @using HelperMethods.Infrastructure @{ Layout = null; } @*@helper ListArrayItems(string[] items) { }*@ Index
Here are the fruits: @Html.ListArrayItems((string[])ViewBag.Fruits) @*@ListArrayItems(ViewBag.Fruits)*@ @*@foreach (string str in (string[])ViewBag.Fruits) { @str }*@
Here are the cities: @Html.ListArrayItems((string[])ViewBag.Cities) @*@ListArrayItems(ViewBag.Cities)*@ @*@foreach (string str in (string[])ViewBag.Cities) { @str }*@
Here is the message:

@Model

This is the content from the helper method:

@Html.DisplayMessage(Model)