Dominic Whitham
Dominic Whitham

Reputation: 119

Seeking Razor View C# Stimulsoft.StiMvcViewer converted to VB

I'm familiar with the VB language of "New With {.xyz = "abc"}), but this one has me stumped. The C# razor code is;

@Html.Stimulsoft().StiMvcViewer(new StiMvcViewerOptions()
{
Actions = 
{
GetReportSnapshot = "GetReportSnapshotITypedList",
ViewerEvent = "ViewerEvent"
}
})

So, how is this represented in VB razor code? Specifically, I'm not sure how to address the "Actions = " and the sub-functions "GetReportSnapshot" etc... Thanks!

Upvotes: 0

Views: 702

Answers (1)

Dominic Whitham
Dominic Whitham

Reputation: 119

@Imports Stimulsoft.Report.Mvc
@Imports System.Web.UI.WebControls

@code
    Dim opt As New StiMvcViewerOptions()
    opt.Actions.GetReportSnapshot = "GetReportSnapshotITypedList"
    opt.Actions.ViewerEvent = "ViewerEvent"
    Html.Stimulsoft().StiMvcViewer(opt)
End Code

Since my question was just on syntax, I believe I can just do the above. Sometimes I wonder why we concentrate so much on using convoluted syntax, when a simple Dim statement does this trick.

Now, if only I can get the Stimulsoft .mrt report to show up...

Upvotes: 2

Related Questions