Iam new to ASP.NET MVC . My question is:
I am developing an application in which on "Show Log" button click ,I need to show a popup window on which a grid view that get poppulated with dynamic Contents. I implemented the "Show Log" button in cshtml. And in its click event ,i mentioned a javascript function "OnShowLogClick". Inside javascript function "OnShowLogClick" I called my Controller Action(that returns the dynamic data to be binded inside the grid) through load method that is:
$(#popupWindowDiv).load("@Url.Action("Action", "Controller")", null,
function (response, status, xhr) {
if (status == "error") {
alert("An error occurred while loading");
}
else {
}
});
I have 2 Issues
1) On intial Click on "Show Log" button ,Controller action is invoked.but on second click javascript function is executed but controller action is not invoked.
2) Grid inside popupWindow is not poppulated with entire data model binded.Everytime only 9 entries are shown.
Please help me Thanks in advance