I really like the bindings feature of spark, it really improves markup but I have come across a small problem. Is it possible to create a spark binding that doesn't have any code in it just html? For example:
<element name="searchbox">
<div class="searchbox">
<input type="text"/>
<img src="/content/images/cross.png" placeholder="${sharedres.searchplacheolder}"/>
</div>
</element>
When I try and render the element searchbox
above I get a page render error:
error CS1501: No overload for method 'Write' takes 0 arguments
Is there a way to do this or do can you only provide code in a binding?
You can do it, the whole binding just needs to represent a string like so turn your code into a string and escape all the angle brackets and it should work:
having said that, you might be better off placing something like this in a partial view.