I am doing an MVC5
Application
..
I am rendering two partial views
from controller method called from $(document).ready
of the main view. But one method is never called.
Here is my view
<div class="dvPpal">
<div class="dvMenuIzqEmpty">
<div style="float:left;width:100%;height:20px;margin-bottom:20px">
</div>
<div style="float:left;width:100%;margin-left:25px; ">
<img class="ImgNick" src="~/Content/Images/Iconos/PhotosSmall.png" />
</div>
<div style="float:left;width:100%;height:30px;" class="Sees">
</div>
</div>
<div id="UserUpload">
</div>
<div class="dvRightPnl">
</div>
</div>
And here is my call
<script language="javascript" type="text/javascript">
$(document).ready(function () {
FormCreateEdit();
$("#dvRightPnl").load('@Url.Action("GetUploadsByUser", "Uploads")');
$("#UserUpload").load('@Url.Action("GetUploadData", "Uploads", new { Upload_id = 0 })');
});
</script>
My controller method looks like this
public async Task<PartialViewResult> GetUploadData(long Upload_id = 0)
{
return null;
}
public async Task<PartialViewResult> GetUploadsByUser()
{
return null;
}
Only GetUploadData
is called.
The method GetUploadsByUser
is never called?
What I am missing?
Thanks