Search Posts


How to fetch dynamic table list in MVC and angularJS

I’m getting a list in my angular.js file (EditDeleteItem.js) which I’m making based on the selected table name. The function to send my list is as below:- $scope.SaveTblRecord = function (list) { //alert(JSON.stringify($scope.employeeList)); $scope.FetchTableName(); //var Data = $.param({ TblData: $scope.MyTblDataList }); var itemList = []; angular.forEach(list, function (value, key) { if (list[key].selected) { itemList.push(list[key].selected); } }); $scope.ItemsList = []; $scope.ItemsList = itemList; $http({ method: “Post”, url: “/Admin/SaveTblData”, data: $scope.ItemsList, }).success(function (data) { $scope.GetTblData($scope.TempName); }).error(function (err) […]

Pass AngularJS parameter to ActionResult method

I have google and tried alot of diffrent solutions to this problom, non of them worked. this is as far as I got. I tried passing it with a Action link and a anchor tag. Tried catching it from the url in the actionResult. This anchor tag produce the right url HTML <a class=”link btn btn-default” ng-href=”@Url.Action(“CloseProject”, “Home”)?id={{item.ID}}”>@Resource.CloseProjectButton</a> C# public ActionResult CloseProject() { Guid id = new Guid(Request[“id”]); _fastaSamarbetenRepo.UpdatePropertyBagItemStatusToClosed(id); return RedirectToAction(“Projekt”); } what am I […]

How can Asp Net Core serve html static pages?

I start recently an Asp .Net Core app. Later i want to integrating it with Angular, but first i want a mechanism that will ‘replace’ cshtml with html. If i change extension from cshtml to html i get this ‘InvalidOperationException: The view ‘Index’ was not found’. Also i tried in Startup app.UseStaticFiles(); app.UseMvc(routes => { routes.MapRoute( name: “default”, template: “{controller=Home}/{action=Index}/{id?}”); }); but also didn’t work. Optional is to integrating cshtml layout content with html pages, […]