Results 1 to 5 of 5

Thread: [RESOLVED] can you bind an dropdownlist to a constant array?

  1. #1

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Resolved [RESOLVED] can you bind an dropdownlist to a constant array?

    I have a dropdownlist in my web form that will have dynamic content based on the selecteditem of ANOTHER dropdownlist on the same page.

    I was wondering if I can bind this dynamic dropdownlist to an array that will always be constant (i'll have many of these constant arrays, but they all will have different data). I figured out how to bind it to an ArrayList but i'm not sure if that will work because i don't know whatthe value of the SelectedIndex will be if I just fill the dropdown list with an ArrayList.

    Hope this makes sense. Thanks for your help!
    Last edited by drpcken; Oct 21st, 2005 at 05:57 PM.

  2. #2
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: can you bind an dropdownlist to a constant array?

    SelectedIndex would be -1.

    The ArrayList should work just fine.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  3. #3

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Re: can you bind an dropdownlist to a constant array?

    so will the value be the same as the text field? thats my main question. SOrry if I confused you.

    Thanks for the replies!

  4. #4
    C# Aficionado Lord_Rat's Avatar
    Join Date
    Sep 2001
    Location
    Cave
    Posts
    2,497

    Re: can you bind an dropdownlist to a constant array?

    They should be, yes.
    Need to re-register ASP.NET?
    C:\WINNT\Microsoft.NET\Framework\v#VERSIONNUMBER#\aspnet_regiis -i

    (Edit #VERSIONNUMBER# as needed - do a DIR if you don't know)

  5. #5

    Thread Starter
    Fanatic Member drpcken's Avatar
    Join Date
    Apr 2004
    Location
    devenv
    Posts
    591

    Re: can you bind an dropdownlist to a constant array?

    GREAT!

    Thank you, I'll test and RESOLVE this post.

    You've been a great help!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width