Bind() using SelectedValue
ASP.NET
1
Posts
1
Posters
0
Views
1
Watching
-
A custom dropdown control I have created inherits from System.Web.UI.WebControls.DropDownList. While creating it I have overridden: OnPreRender() Render() RenderContents() PerformSelect() The problem is when I try to bind the control to a datasource using SelectedValue='<%# Bind("Field1") %>' the control does not appear to pick the value saved in 'Field1'. I have run a trace when debugging and realised that the SelectedValue property is not initialised even after binding as above. Where should I start looking? Thanks.