I have one drop downlist and text box in my view. now i have to set selected value of dropdownlist to textbox using jquery. i should not post back. i am learning mvc3 . so give me optimal way of doing it.
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
If you don’t want to postback you will need to use javascript. For example if you use jQuery you could subscribe to the
.change()event of the dropdown and set the value of the textbox:I would also recommend you going through the getting started tutorials in the jQuery documentation as this is quite basic functionality.