TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Mahesh Patil
NA
41
10.5k
MVC Model binding in ajax responce method
Apr 10 2015 10:46 AM
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
Reply
Answers (
3
)
Single quote inside double quote in c#
stock management project in mvc 5 c#