Do you mean when a user enters something in a textbox and hits a button, you
want to have a value in a listbox selected? If so, then it's pretty easy.
<asp:textbox id="txt" runat="Server" /> <asp:button id="btn"
runat="server" Text="Go!" /><br /><br />
<asp:dropdownlist id="ddl" runat="Server">
<asp:ListItem Value="1">Canada</asp:ListItem>
<asp:ListItem Value="2">United States</asp:ListItem>
<asp:ListItem Value="3">Mexico</asp:ListItem>
</asp:dropdownlist>
And your codebehind could look something like:
Protected WithEvents btn As System.Web.UI.WebControls.Button
Protected txt As System.Web.UI.WebControls.TextBox
Protected ddl As System.Web.UI.WebControls.DropDownList
Private Sub btn_Click(ByVal sender As System.Object, ByVal e As
System.EventArgs) Handles btn.Click
Dim textboxValue As String = txt.Text
ddl.SelectedIndex =
ddl.Items.IndexOf(ddl.Items.FindByValue(textboxVal ue))
End Sub
this is obviously a simple example.
Karl
"RockNRoll" <da*******@yahoo.com> wrote in message
news:Od*************@TK2MSFTNGP12.phx.gbl...
Greetings,
Can I select an item in a listbox based on user textbox entry and a submit
button? Can you provide any code examples for what needs to occur when
the user clicks submit? Thank you,
-Dave