I have already this listbox that displays data from database whenever a page is loaded. My problem is that i want to display the remaining details of that data whenever i click a data in the listbox(ListBox1_SelectedIndexChanged). Please can anyone help me on this.
Below is my starting code.
Below is my starting code.
VB.NET:
PrivateSub Button2_Click(ByVal sender AsObject, ByVal e As System.EventArgs) Handles Button2.Click
clearTextBox(Me.Controls)
EndSub
PrivateSub clearTextBox(ByVal cs As ControlCollection)
Dim c As Control
ForEach c In cs
IfTypeOf c Is TextBox Then
CType(c, TextBox).Text = ""
EndIf
clearTextBox(c.Controls)
Next
EndSub
ProtectedSub Page_Load(ByVal sender AsObject, ByVal e As System.EventArgs) HandlesMe.Load
TextBox4.Text = DateTime.Now.ToString
Button1.Attributes.Add("onclick", "window.close();")
EndSub
ProtectedSub ListBox1_SelectedIndexChanged(ByVal sender AsObject, ByVal e As System.EventArgs) Handles ListBox1.SelectedIndexChanged, TextBox1.DataBinding, DropDownList2.DataBinding, TextBox2.DataBinding, DropDownList3.DataBinding, DropDownList5.DataBinding, TextBox4.DataBinding, DropDownList4.DataBinding, TextBox5.DataBinding, TextBox3.DataBinding
'TextBox1.Text = ListBox1.SelectedItem.Text
Label10.Text = "There are " & ListBox1.Items.Count & " available words."
EndSub
Last edited by a moderator: