are u sachin fr chembur?

Hello,

I am working on a webapplication,

 

I have a dropdown list which is filled up using a dataset.  There is also a textbox right next to it.  The end user should select a value from the dropdownlist, and then I would like the textbox to be filled with a value depending on what item was selected from the dropdown list.

 

I tried using the SelectedIndexChanged  but it doesnt do anything, and I do not see any other event that would let me fill that textbox depending on what is selected.

 

 

If anyones has a suggestion,

 

Thanks.



Answer this question

are u sachin fr chembur?

  • Pellaeon

    This sounds to me like the autopostback property is false for the drop down list.  False is the default value, so unless you made the change, it doesn't matter what other properties you try to configure to make it work, it won't.

    Hope this helps!

    Rich Hopkins
    Computer Programming Student


  • Per Stuge

    Try the SelectedIndexChanged event of your dropdownlist.

    -chris

  • Mr.DEV

     

    ListBox1.Items.Add("Sachin")

    ListBox1.Items.Add("Sachin1")

    ListBox1.Items.Add("Sachin2")

    ListBox1.Items.Add("Sachin3")

    ------------------------------------------------------------------------------

    TextBox1.Text = ListBox1.Items.Item(ListBox1.SelectedIndex)

    --------------------------



  • silverfrost

    you'r the man,  I worked thanks a lot
  • Leeoniya

    are u sachin from chembur
  • Sai Ram

    Thanks a lot,

     

    I still do not know i what event of the dropdonwlist should i plased the :

    TextBox1.Text = ListBox1.Items.Item(ListBox1.SelectedIndex)

    So whenever a user changes the selected value from the listbox It changes also the value from the textbox.

     

     

    Thanks again,

     

    Ed


  • are u sachin fr chembur?