This is a migrated thread and some comments may be shown as answers.

how can I get the first index of a radlistbox ?

1 Answer 76 Views
ListBox
This is a migrated thread and some comments may be shown as answers.
Hamza
Top achievements
Rank 1
Hamza asked on 21 Sep 2011, 01:51 PM
Hi all :)


how can I get the first index or specified index of a rad list box ?


for example:


I want to put the value of a the first or second index as a text in a textbox


how can I do that ?


thank you all :)

1 Answer, 1 is accepted

Sort by
0
Shinu
Top achievements
Rank 2
answered on 22 Sep 2011, 06:04 AM
Hello Hamza,

You can try the following code to achieve your scenario.
C#:
protected void Button1_Click(object sender, EventArgs e)
   {
       TextBox1.Text = RadListBox1.Items[0].Text;
   }

Thanks,
Shinu.
Tags
ListBox
Asked by
Hamza
Top achievements
Rank 1
Answers by
Shinu
Top achievements
Rank 2
Share this question
or