Tech
Forums
Jobs
Books
Events
Interviews
Live
More
Learn
Training
Career
Members
Videos
News
Blogs
Login
Sign Up
Ask Question
3
Reply
MVC Model binding in ajax responce method
Mahesh Patil
Apr 10 2015 10:46 AM
561
Reply
Hello
I want to bind
MVC model in ajax call responce like
$.ajax({
async: false,
url: $('#ajaxURLclockoutDetails').val(),
type: 'GET',
cache: false,
data: {
newServiceCode: Selectedvalue,
'ConsumerServiceAndPeriod.ConsumerID': $('#DConsumerID').val()
},
success: function (result) {
1) $('#ConsumerServiceAndPeriod.
TimesheetID
').val(result.
TimesheetID
);
or
2) @Html.HiddenFor(m => m.TimesheetID, new { Value =@<%'$("#DConsumerID").val()'%> })
or
3)@Html.Hidden("ConsumerServiceAndPeriod.TimesheetID",
result.
TimesheetID)
}
});
i have mention three possible ways for binding model but no any of them worked
so any one can help me about
bind
ConsumerServiceAndPeriod
model in ajax responce method
Thanks in advance
Upload Source Code
Select only zip and rar file.
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Access Data from nested datalist
show timer in hidden field