Autopostback not working with dropdownlist

I have a text box textbox1 and a dropdownlist dropdownlist1 containing "Apple", "Mango","Orange".

I have created a subroutine for selected Item changed. in this, do the following:
Me.textbox1.text = me.dropdownlist1.selecteditem.text

However, when I, select say "mango", it is not displayed in textbox1.text eventhough autopostback = true is for both these controls.

I have also checked that a javascript is created on client side with form:submit()

please help,

Dilip Nagle

Comments

  • It will never work, because textbox and dropdownlist are two different types of web controls

    Here is what could be done

    function ReturnFruit()as string
    dim MyFruit as string
    MyFruit = dropdownlist.selecteditem.text
    return MyFruit
    end function

    textbox1.text = ReturnFruit

    : I have a text box textbox1 and a dropdownlist dropdownlist1 containing "Apple", "Mango","Orange".
    :
    : I have created a subroutine for selected Item changed. in this, do the following:
    : Me.textbox1.text = me.dropdownlist1.selecteditem.text
    :
    : However, when I, select say "mango", it is not displayed in textbox1.text eventhough autopostback = true is for both these controls.
    :
    : I have also checked that a javascript is created on client side with form:submit()
    :
    : please help,
    :
    : Dilip Nagle
    :



Sign In or Register to comment.

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Categories

In this Discussion