I’ve seen various debate about whether inline markup expressions work in VB, and I want to tell you that they do. Here is how I did it. Define a method like the following, which will be an HTML helper extension. Please see my introductory post on how to do that:
Public Sub Inline(Of TModel)(html As HtmlHelper(Of TModel), template As Action(OF TModel))
In a view, you can define an implementation of that method like the following:
@<span>This is my template</span>
This approach has worked for me, as long as any helper using the template is inside an @Code block, and the Sub(m) declaration is a multi-line sub, not an inline statement.