Possible to pass an object to a Binding via an attribute?

11 views
Skip to first unread message

Jordan

unread,
Mar 7, 2013, 10:37:40 AM3/7/13
to spar...@googlegroups.com
Hi,

Is it possible to declare a binding something like this:

<element name="routelink">Html.RouteLink(@details.LinkText, @details.RouteName, @details.RouteValues)</element>

ie, pass in an object and then access its properties?

The above isn't currently working for me, but I just wondered if I was doing something stupid.

thanks,
Jordan.

Robert Greyling

unread,
Mar 8, 2013, 3:19:03 AM3/8/13
to spar...@googlegroups.com
I'm pretty sure that wouldn't work since the @ directives are essentially just substitutions after the C# values have already been worked out. So you'll need to pass in @linktext, @routename etc from the spark view binding reference for this to work



--
You received this message because you are subscribed to the Google Groups "Spark View Engine Dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to spark-dev+...@googlegroups.com.
To post to this group, send email to spar...@googlegroups.com.
Visit this group at http://groups.google.com/group/spark-dev?hl=en.
For more options, visit https://groups.google.com/groups/opt_out.
 
 

Jordan

unread,
Mar 8, 2013, 5:01:15 AM3/8/13
to spar...@googlegroups.com
Ok cool, make sense.
Cheers,
Jordan.
Reply all
Reply to author
Forward
0 new messages