Tech
Forums
Jobs
Books
Events
Videos
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
1
Answer
loading partial view to a div fails from jquery
jinith joseph
13y
2.1k
1
Reply
Hi I have a small partial view which is to be populated into a div. The div is not gettin updated with the returned partial view.
This is the controller :
public
ActionResult
GFISNumbersTable(
int
id)
{
Archive
archive = _archiveService.GetArchive(id);
var
viewModel =
new
ArchiveViewModel
(archive, _archiveService,
null
, 0,
ArchiveViewModel
.
DataLoadFlags
.None);
return
PartialView(
"GFISNumbersTable"
, viewModel);
}
this is the jquery code:
$("#ResultTable").load("/Archive/GFISNumbersTable/", { id: formvar });
and the partial view is as:
<%
foreach (Engagement engagement in Model.Archive.Engagements.OrderBy(x => x.EngagementNumber))
{
if (engagement.EngagementNumber != Model.Archive.EngagementNumber)
{%>
<tr>
<td>
<%=engagement.EngagementNumber.ToString()%>
</td>
<td style="padding-left: 50px">
<%=engagement.Name.ToString()%>
</td>
</tr>
<%}
} %>
The DIV to update is as:
<
div
id
="ResultTable">
<%Html.RenderPartial(
"GFISNumbersTable"
, Model); %>
</
div
>
which is in the same document as the jquery is written.
The partial view i think is returned successfully, with the desired results, but the DIV is not getting updated.
Please help...
Thanks in advance..
Post
Reset
Cancel
Answers (
1
)
Next Recommended Forum
Invalid Column Error
How to Create Store Procedure in Sql Server2008 ?