hi thanks calvin. I know that you can set an individual list item to be
selected, my question was more that if it works anyway, why does it put the
squiggly line under it in html view (I am setting the selectedvalue to a
datalist databind item), so in the definition of the dropdownlist i have
SelectedValue='<%# DataBinder.Eval(Container.DataItem,
"genderid").ToString() %>'
It works, but always underlines 'SelectedValue'. SelectedValue IS a property
of Dropdownlist, so why doesnt it like it?
Thanks and happy new year.
"Calvin Luttrell" wrote:
Louise,
<asp:ListBox id="ListBox1" runat="server">
<asp:ListItem Value="test1">test1</asp:ListItem>
<asp:ListItem Value="test2" Selected="True">test2</asp:ListItem>
<asp:ListItem Value="test3">test3</asp:ListItem>
</asp:ListBox>
forums, articles, news -> www.ProjectThunder.com
-Calvin Luttrell
"louise raisbeck" <lo************@discussions.microsoft.com> wrote in message news:B6**********************************@microsof t.com... Hi there. I am a little confused. SelectedValue is a property of ListBox and
dropdownlist. However it isnt in the list of properties in intellisence (html
view i am not talking about code behind where it does list it). So when I
create my asp:ListBox and try to set SelectedValue=(to a databind value) it
has a squiggly line under it and says 'not recognised property of list box'.
The thing is, it works, so i have ignored it, but I would quite like to know
why this happens? Is it something I've missed?
Thanks