1. in vb.net do this
Assume ListBox1 is a name of your list box.
Private Sub ListBox1_Click(ByVal sender As Object, ByVal e As System.EventArgs) Handles ListBox1.Click
TextBox1.Text = ListBox1.SelectedItem
End Sub
2.in asp.net
Assume ListBox1 is a name of your list box.
set AutoPostBack property of listbox " True " budefault is "False"
Private Sub ListBox1_SelectedIndexChan
TextBox1.Text = ListBox1.SelectedValue
End Sub
--------------------------
ISKPatel
Main Topics
Browse All Topics





by: nayernaguibPosted on 2005-05-19 at 02:26:19ID: 14034621
Assume that the listbox is named ListBox1 and the textbox is named TextBox1. Follow these steps:
1. Change the value of the AutoPostBack property of the listbox to True.
2. In the handler of the SelectedIndexChanged event of the listbox, add the following line:
TextBox1.Text = ListBox1.SelectedItem.Text
________________
Nayer Naguib