Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
2
Reply
How to add a dropdownlist, on click of button in MVC view?
Jaima Joseph
Apr 1 2014 3:33 AM
2.1k
Reply
Hii,
Any help??
I have to add a row with some text boxes and a dropdownlist, dynamically on click of an AddRow button and the dropdownlist should list values from database.And on click of Submit button I want to send the values of all these controls to the controller.I have implemented this using all textboxes instead of one dropdownlist , using javascript and it works fine now I want to change one textbox to dropdown list.
$(
".addbtn"
).click(
function
() {
var
newRow =
'<tr>'
+
'<td><input type="text" id="SupplierName" name="SupplierName" style="width:100px;" onclick="onClickSupplr()"/></td>'
+
'<td><input type="text" id="Price" name="Price" style="width:75px;" class="clsPrice" /></td>'
+
'<td><input type="text" id="Quantity" name="Quantity" style="width:75px;" class="clsQty"/></td>'
+
'<td><input type="text" id="datepicker" name="datepicker" style="width:75px;" class="test"/></td>'
+
'<td><input type="text" id="CreditTerm" name="CreditTerm" style="width:75px;" onclick="onClickCr()"/>'
+
'<td><input type="text" id="datepicker1" name="datepicker1" style="width:75px;" class="test"/></td>'
+
'<td><input type="text" id="datepicker2" name="datepicker2" style="width:75px;" class="test"/></td>'
+
'<td><input type="text" id="CommMode" name="CommMode" style="width:75px;" onclick="onClickComMode()"/></td>'
+
'</tr>'
;
$(
'#myTable tr:last'
).after(newRow);
});
Now I want to use a dropdownlist instead of '
CreditTerm' textbox and it should list some values from database.
Any help ??please....
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
2
)
Next Recommended Forum
How to open a source code file which is deployed on IIS
intall db in click of the button in window forms