Hi all,

I have a dropdown and a textbox and I want to be able to change the textbox to a dropdown control, after a certain value in the dropdown is selected.
I have a problem in changing the controls from textbox to dropdown.


Any help???

Recommended Answers

All 5 Replies

Load a new page which looks similar, but has the dropdown instead of the textbox.

Hi all,

I have a dropdown and a textbox and I want to be able to change the textbox to a dropdown control, after a certain value in the dropdown is selected.
I have a problem in changing the controls from textbox to dropdown.


Any help???

ok this could be a long winded approach to what your after, why not use Javascript to create a Hidden ComboBox Which when the user selects your special choice in the main ComboBox will hide the current text box and show the Hidden ComboBox and vice versa when the result isnt selected. There are alot of tutorials out there that show the basics of this.

Thanks a lot for the suggestions. I figured that the easiest way will be having two controls and switching between the textbox and the dropdown. Meanwhile hiding the other and vice versa.
It was a pretty simple javascript!

Thanks !

Hi all,

I have a dropdown and a textbox and I want to be able to change the textbox to a dropdown control, after a certain value in the dropdown is selected.
I have a problem in changing the controls from textbox to dropdown.


Any help???

Hi
tyr this one
TextBox1.TextMode = TextBoxMode.MultiLine;
this change the mode of the textbox to multi line
it's show like drop down list

let me know this is u needed

Thanks a lot for the suggestions. I figured that the easiest way will be having two controls and switching between the textbox and the dropdown. Meanwhile hiding the other and vice versa.
It was a pretty simple javascript!

Thanks !

Could you please provide the javascript for this solution. Thanks.

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.