Hi All

I have a dropdownlist in one page, now I want to display the contents of that dropdownlist in a different page, can someone help me with this.

Thanks in advance

Recommended Answers

All 3 Replies

'page' as in form?

if so, declare the drop-down list yourself and add a public access modifier to it.

in the new form, go through the index of the original list with a for-loop and populate the new one.

hope this helped
pygmalion

Its a website i created, using asp.net 2.0 and c#, Can you please send me the code for this. Just the line of dispalying the items in another web page.

Thanks,

well, in c#, that would do:

for(int i = 0; i < amountItems; i++)
{
    newDropdown.Items.Add(oldDropdown.Items.IndexOf(i);
}

hope this helped
pygmalion

Be a part of the DaniWeb community

We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.