Created Issue: Define a normal method in a view

2 views
Skip to first unread message

sparkviewengine Issue Tracker Rss Feed

unread,
Jun 26, 2009, 1:42:02 PM6/26/09
to spar...@googlegroups.com
Something similar to <script runat="server"> which could add methods or properties to views outright.

Could be raw language code inside the tags. Is there a reason to escape back into spark vernacular? Nah... You could always call a macro from code to accomplish that, which would be much easier to read or understand anyway.

So the contents would probably be pure code. Until the end </script> is reached...

Or would a <![CDATA[ type of notation be better? Not nice looking... But xml friendly... And it's not like injecting code in this manner will often be the first option.

<![CDATA[code[
void Foo(int bar) {...}
]]]>

Maybe the target language should also be named...

<![CDATA[cs[
void Foo(int bar) {...}
]]]>

<![CDATA[js[
function Foo(var bar) {...}
]]]>

So that you could have some additional control in situations where you're attempting to create dual-use partials.

URL: http://sparkviewengine.codeplex.com/WorkItem/View.aspx?WorkItemId=3359

Reply all
Reply to author
Forward
0 new messages