G
Guest
Hi again!
Right, okay... im now trying to get the value of an <asp:TextBox> control.
so I have on my ASPX page...
<asp:ListBox id="results" runat="server"></asp:ListBox>
<asp:TextBox id="txtSelected" runat="server"></asp:TextBox>
In my code-behind Page_Load i have..
results.Items.Add("Dan");
results.Items.Add("Fred");
I double clicked the listbox and it the createdresults_SelectedIndexChanged
function for me, to which ive added...
txtSelected.Text = results.SelectedItem.Value;
It doesn't work! Tried various properties from ListBox, nothing seems to
work. It's not even refreshing the page. It just does nothing. Not sure if
it's the code or I've created the wrong function (maybe results_OnClick is
better?).
help
cheers
Dan
Right, okay... im now trying to get the value of an <asp:TextBox> control.
so I have on my ASPX page...
<asp:ListBox id="results" runat="server"></asp:ListBox>
<asp:TextBox id="txtSelected" runat="server"></asp:TextBox>
In my code-behind Page_Load i have..
results.Items.Add("Dan");
results.Items.Add("Fred");
I double clicked the listbox and it the createdresults_SelectedIndexChanged
function for me, to which ive added...
txtSelected.Text = results.SelectedItem.Value;
It doesn't work! Tried various properties from ListBox, nothing seems to
work. It's not even refreshing the page. It just does nothing. Not sure if
it's the code or I've created the wrong function (maybe results_OnClick is
better?).
help

cheers
Dan