Binding a select in a client template
I recently got a question on one of my client template posts asking me how to bind a select tag’s value to data in client templates . I was surprised not to find anything on the web addressing the problem, so I thought I’d write a short post about it. It really is very simple once you know where to look. You just need to bind the value property of the select tag, like this: < select sys : value ="{binding color}" > If you do it from markup like here, you just need to use the sys: prefix. It just works. Here’s the full source code for my sample page: <! DOCTYPE html > < html > < head > < title > Binding a select tag </ title > < script src = http://ajax.microsoft.com/ajax/beta/0911/Start.js type
Read More...
Read the complete post at http://weblogs.asp.net/bleroy/archive/2010/03/11/binding-a-select-in-a-client-template.aspx