Q: Webforms .NET 4.5 Model binding to a textbox I am looking at the new model binding features of WebForms .NET 4.5:
http://www.asp.net/web-forms/tutorials/hands-on-labs/whats-new-in-web-forms-in-aspnet-45
However it appears this is limited to GridView, FormView etc. How can a bind to a simple asp:Texbox?

A: Model binding is enabled for controls that are inheriting from DataBoundControl (it has ItemType property that you can use to specify the type of model). But it is not limited to FormView and GridView. Here is the full list of controls:


*

*AdRotator

*Chart

*ListView

*BulletedList

*CheckBoxList

*DetailsView

*DropDownList

*FormView

*GridView

*ListBox

*RadioButtonList


Binding in ASP.NET Web Forms (i.e. usage of <%# Eval("...") %>, <%# Bind("")  %>, <%# XPath ("..."), <%# DataItem.PropertyName %> server tags) can be used only inside databound controls. 
This means that to bind data to TextBox using new model binding features you need to use any of the listed above controls.
