ASP.net
Awesome
Learn
Forum
Buy
Demos
Sign In
☾
☀
Switch to
Dark
Light
Mode
this site works best with javascript enabled
Ask Question
Binding a parent ODropDown to a Text field
Title:
B
I
{code}
?
I have a grid and when I create a new phone record, I need to choose a free phone number in a ODropDown. I have also to fill a text box for Display Phone Number. I would like to automatically pre-fill this TextBox based on the choice of the ODropDown box (as we can do with DropDown box parenting http://demo.aspnetawesome.com/AjaxDropdownDemo#Cascading-dropdownlist-using-binding-to-parent). How can I do that with Textbox ? Thanks
Save Changes
Cancel
Alain Rime
asked at 09 May 2016
so you need to change the textbox.value when the value of the odropdown changes ?
at 09 May 2016
Omu
Could you provide me a small example. In my form : @Html.EditorFor(o => o.LineURI) // oDropBox @Html.EditorFor(o => o.TelephoneNumberDisplay) // textbox
at 09 May 2016
Alain Rime
$('#LineURI').change(function () { alert($(this).val()); $('#TelephoneNumberDisplay').val($(this).val()); });
at 09 May 2016
Omu
Answers
please
Sign In
to leave an answer
By accessing this site, you agree to store cookies on your device and disclose information in accordance with our
cookie policy
and
privacy policy
.
OK