add into a listbox - "Object reference not set to an instance of an object."
hello
i need to produce a web page that has a button that takes a selected item from "listbox1" and adds it into "listbox2" via a dataset, this application needs to be used by many users at the same time.
this is the code for the button...
PHP Code:
Private Sub btnAdd_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnAdd.Click
Dim Tag As DataRow
Tag(1) = ListBox1.SelectedItem.Text
dstSelectedTags.Tables("tblSelectedTags").Rows.Add(Tag)
ListBox2.DataSource = dstSelectedTags
ListBox2.DataBind()
End Sub
i am getting "Object reference not set to an instance of an object."
what is wrong??
please help
thanks,
tom