Dropdownlist.... please help

Please support our C# advertiser: Intel Parallel Studio Home
Reply

Join Date: Mar 2007
Posts: 32
Reputation: sibotho is an unknown quantity at this point 
Solved Threads: 0
sibotho's Avatar
sibotho sibotho is offline Offline
Light Poster

Dropdownlist.... please help

 
0
  #1
May 16th, 2007
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
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 71
Reputation: pygmalion is an unknown quantity at this point 
Solved Threads: 1
pygmalion's Avatar
pygmalion pygmalion is offline Offline
Junior Poster in Training

Re: Dropdownlist.... please help

 
0
  #2
May 16th, 2007
'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
Microsoft Employee: "Hey, it compiles! Ship it."
Reply With Quote Quick reply to this message  
Join Date: Mar 2007
Posts: 32
Reputation: sibotho is an unknown quantity at this point 
Solved Threads: 0
sibotho's Avatar
sibotho sibotho is offline Offline
Light Poster

Re: Dropdownlist.... please help

 
0
  #3
May 17th, 2007
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,
Reply With Quote Quick reply to this message  
Join Date: Dec 2006
Posts: 71
Reputation: pygmalion is an unknown quantity at this point 
Solved Threads: 1
pygmalion's Avatar
pygmalion pygmalion is offline Offline
Junior Poster in Training

Re: Dropdownlist.... please help

 
0
  #4
May 17th, 2007
well, in c#, that would do:

  1. for(int i = 0; i < amountItems; i++)
  2. {
  3. newDropdown.Items.Add(oldDropdown.Items.IndexOf(i);
  4. }
hope this helped
pygmalion
Last edited by pygmalion; May 17th, 2007 at 8:51 am.
Microsoft Employee: "Hey, it compiles! Ship it."
Reply With Quote Quick reply to this message  
Reply

This thread is more than three months old.
Perhaps start a new thread instead?
Message:


Thread Tools Search this Thread



About Us | Contact Us | Advertise | DaniWeb | Acceptable Use Policy | RSS Feed

©2003 - 2009 DaniWeb® LLC