It would be more logical to just expect it to work like this.
@Tag.Div(item.Title).Attr(Edit.TagToolbar(item))
The error you get w/o the .ToString() doesn't make the solution obvious/discoverable:
Error: Microsoft.CSharp.RuntimeBinder.RuntimeBinderException:
The best overloaded method match for 'ToSic.Razor.Markup.Tag
<ToSic.Razor.Html5.Div>.Attr(string, object, string)' has some
invalid arguments at CallSite.Target(Closure , CallSite , Div , Object )
at System.Dynamic.UpdateDelegates.UpdateAndExecute2[T0,T1,TRet]
(CallSite site, T0 arg0, T1 arg1) at ASP._Page_Portals_0_2sxc_Data__Party_Display_wAccordion_cshtml.BuildPartyFeesHtml(Object party)
in \Portals\0\2sxc\Data\_Party-Display-wAccordion.cshtml:line 225 at
As previously discussed in a StackOverflow Q/A here, Is there an Elegant way to use Razor Blade to add TagToolbar()?, it seems like a useful enhancement to RazorBlade...
This currently works, but its a bit awkward and non-obvious to use .ToString() to get it to work.
It would be more logical to just expect it to work like this.
The error you get w/o the .ToString() doesn't make the solution obvious/discoverable: