Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post Apr 01, 2010 05:17 PM by PeteNet
Member
71 Points
30 Posts
Apr 01, 2010 04:58 PM|LINK
I've been binding dropdownlists within detailsview controls like so for years
SelectedValue='<% Bind("Field1")%>'
Now in VS 2008 is kicks out the error in the subject line. So what gives? And how do we bind dropdownlists then?
Apr 01, 2010 05:10 PM|LINK
Turns out if you leave off the # you get the glorious error above.
SelectedValue='<%# Bind("Field1")%>' is the correct syntax.
All-Star
81342 Points
11398 Posts
Apr 01, 2010 05:17 PM|LINK
:) ok...you caught us napping there!
indeed that forms the binding expression.
Alex in Fres...
Member
71 Points
30 Posts
The SelectedValue property cannot be set declaratively
Apr 01, 2010 04:58 PM|LINK
I've been binding dropdownlists within detailsview controls like so for years
SelectedValue='<% Bind("Field1")%>'
Now in VS 2008 is kicks out the error in the subject line. So what gives? And how do we bind dropdownlists then?
Alex in Fres...
Member
71 Points
30 Posts
Re: The SelectedValue property cannot be set declaratively
Apr 01, 2010 05:10 PM|LINK
Turns out if you leave off the # you get the glorious error above.
SelectedValue='<%# Bind("Field1")%>' is the correct syntax.
PeteNet
All-Star
81342 Points
11398 Posts
Re: The SelectedValue property cannot be set declaratively
Apr 01, 2010 05:17 PM|LINK
:) ok...you caught us napping there!
indeed that forms the binding expression.
Peter