I am not sure if this is possible.
I have a bunch @Helperinside the view AND in other views:
@helper ViewHelper1()
{
...
}
@helper ViewHelper2()
{
...
}
etc.
I have repeating code that is used in an AND view in other views:
@if (!(Model.Entity == Model.Enum.One))
{
<td>
@ViewHelper1()
</td>
}
else
{
<td>
@ViewHelper1()
</td>
<td>
@ViewHelper1()
</td>
}
Actual one @ViewHelper1has more complex code, but that doesn't matter (I think).
Well, since each view has a number @Helper(30+ views, 10-15 @Helpereach), and the structure <table>is the same, I was wondering how to make a creation @Helperin App_Codewhich encapsulates the structure <td>and then passes the view @Helper.
Say:
@helper Table(...)
{
...
}
Or is it even possible, and then call it in a view, for example:
@Table(HelperView1)
If I need help with the syntax.
As always, much appreciated.