Invalid Cast

Mar 29 2006 6:19 PM
I am trying to access a dynamically created control ( a tabpage ) with the following code:

((ListView)this.tabControl1.TabPages[1].Controls[1]).Items.Add("HELLO");

I am getting an error:
Specified cast is not valid.


What am I doing wrong?

Thanks,
Jon

Answers (1)