Click here to Skip to main content
15,915,703 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have a dropdownlist and a text box on the top of drop down.Now what i want is, "if i put some value (i.e. date) in textbox then dropdownlist will bind a list on the basis of text box value. and i have to do this in mvc. is there any java script code???
Posted
Comments
[no name] 4-Aug-13 11:38am    
"is there any java script code?" sure there is. Tons of javascript code. The question is what have you done to attempt this yourself? And why on earth would you want to even try this using javascript?
prthghosh999 6-Aug-13 7:35am    
actually i have to change the dropdown list items on the basis of value(date) entered in to the textbox. i've called onChange event to get text box value. but i've to bind dropdownlist
TryAndSucceed 5-Aug-13 19:00pm    
Do you hit a button after entering value in textbox? And how do you know the user is entering the value you need for DropdownList? There has to be a post action after you enter a value in textbox.
prthghosh999 6-Aug-13 6:58am    
i use to call a javascript method in my textbox like this..
@Html.TextBoxFor(model => model.AppointmentDate, new { @style = "height:25px;width:100px; border: 1px #ccc solid;", id = "AppointmentDate", onChange = "return compute()" })
TryAndSucceed 6-Aug-13 13:35pm    
Well, call action from your javascript. In the action, you can both check the input and based on input upload the dropdownlist.

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900