ttkalec1
Member
- Joined
- Feb 26, 2005
- Messages
- 19
I have this situation. I wrote some code and it works just fine when I run it locally on my Visual Studio server, but when I send it to my web site, it doesnt work.
The code looks like this:
Its pretty simple. it populates a second listbox with some values when I click on an item in listbox1.
AutoPostBack is set to True on my listboxes and I have enabled ViewStates for my listboxes.
ListBox1 comes with predefined items, but when I click on of that items nothing happens if I run it on my website.
What could be the problem?
The code looks like this:
Code:
Protected Sub ListBox1_SelectedIndexChanged(ByVal sender As Object, ByVal e As EventArgs) Handles ListBox1.SelectedIndexChanged
ListBox2.Items.Clear()
If ListBox1.SelectedItem.Text = "ab" Then
ListBox2.Items.Add("aaaabbb")
ListBox2.Items.Add("aaacccc")
ListBox2.Items.Add("aaadddd")
End If
End Sub
Its pretty simple. it populates a second listbox with some values when I click on an item in listbox1.
AutoPostBack is set to True on my listboxes and I have enabled ViewStates for my listboxes.
ListBox1 comes with predefined items, but when I click on of that items nothing happens if I run it on my website.
What could be the problem?