You should use:
lstIPC.SelectedItem.Text
there is no SelectedText property.
Also, I would change this:
Dim obj as Object
Dim name as String
obj=lstIPC.SelectedValue
name = Convert.ToString(obj)
to
Dim name as String = lstIPC.SelectedValue or
Dim name as String = lstIPC.SelectedItem.Text
since, in either case, the return type is string you do not need to convert it.
The reason for your error, I imagine, is as Gonzalo orginally said. By Binding the list as you have you have probably only populated the string portion of the listitems and not the values.
To change that do something like:
lstIPC.DataTextField = "somecolumninyourdatasource"
lstIPC.DataValueField = "somecolumninyourdatasource"
lstIPC.DataSource = ds
lstIPC.DataBind()
hth.
================================================== =========
Read this if you want to know how to get a correct reply for your question:
http://www.catb.org/~esr/faqs/smart-questions.html
================================================== =========
.: Wrox Technical Editor / Author :.
Wrox Books 24 x 7
================================================== =========