I have a helper method:
@helper Message(Func<object, object> markup) { <tr class="message"> <td width="100%" style="padding-bottom: 1em; color: #333333; font-size: 14px; line-height: 1.3"> @markup.DynamicInvoke(this.ViewContext) </td> </tr> }
which I call with razor markup, for example:
@<text> We are writing to let you know that @ViewBag.HostName has canceled @ViewBag.TripName and we've removed the trip from your My Trips page. <br /> <br /> To plan a new trip, go back to Travefy <br /> </text>
However, I do not know the syntax to get the ViewContext page, because although I saw this.ViewContext in the example, this does not exist in the helper. Any ideas where I can access it?
source share