Search Posts


Nav and DOM are "shifting" slightly when I go from page to page

I am writing a full-stack app, with a C#/ASP.NET back-end, and an AngularJS/Bootstrap 4 front-end. Once a particular page has enough rendering in the DOM to need a vertical scroll bar, I’ve noticed a slight shifting of pretty much everything as you navigate to and from that page. I’ve spent several days trying to figure this out, but no such luck. I did notice that a slightly similar question was asked about 3 years ago […]

How to download file from web api using token based athorization

How to call a WEB API method to download file when the web api uses token based authorization? We are able to download the file if we don’t have authorize and if we give window.location.href = “/api/CaseDetailsSvc/DownloadCaseDoc?strFileName=” + fileName . But we would like to be able to allow only authorized users to call this web api method. How to solve this? Here’s the code we have: [Authorize(Roles = “RspCaseEdit”)] public class CaseDetailsSvcController : ApiController […]

Url Rewrite works fine in Angular Js but causes 404 Error on reloading page [duplicate]

This question already has an answer here: How do I configure IIS for URL Rewriting an AngularJS application in HTML5 mode? 5 answers I have been working with URL rewriting, I have done all the basic steps which include enabling html5 mode, adding base href to master page, and adding rewrite rules in web.config. Now it rewrites the URL From localhost:5050/index.html#/Home to localhost:5050/Home But when I refresh this page it gives the 404 not found […]

File Upload Error :- System.IO.FileNotFoundException c#

Asking an old question again as the solutions out there haven’t worked for me. While trying to update a file I get this exception :- System.IO.FileNotFoundException I’m sending file via my AngularJS file as:- $scope.ChechFileValid($scope.SelectedFileForUpload); if ($scope.IsFileValid) { var formData = new FormData(); formData.append(“File”, $scope.SelectedFileForUpload); formData.append(“Tbl”, itemTbl); formData.append(“ID”, itemId); formData.append(“Name”, EditName); formData.append(“Desc”, EditDesc); formData.append(“Status”, EditStatus); formData.append(“SEOTitle”, EditSEOTitle); formData.append(“SEOKeyword”, EditSEOKeyword); formData.append(“SEODesc”, EditSEODesc); show_ajax_loader(); //var Data = $.param({ ID: itemId, Tbl: itemTbl, Name: EditName, Desc: EditDesc, Status: […]

Angular in external file not working

To make it easy to understand, I made two examples of which one works and the other doesn’t. The first one is the script content inside html page and it is working fine. <html ng-app> <head> <script type=”text/javascript” src=””></script> </head> <body> <input type=”text” ng-model=”helloAngular” /> <h1>{{helloAngular}}</h1> </body> </html> This is the part of code that is not working (inside the same html page): <div ng-app=”app”> <p>Try to change the names.</p> <div ng-controller=”personController”> <p> First Name: […]

Multiple level loop of same entity using AngularJS ng-repeat-start and ng-repeat-end in HTML table tag

Lets assume that I have an entity called GrandPa which is passed to my razor view, its model is as below(ParentChiled). As u see Child property is the List of ParentChiled class, using that GrandPa entity has 2 inner Child list of ParentChiled type which I want to loop thru each child also and print there Name. Class ParentChiled { public string Name {get;set;} public List<ParentChiled> Child {get;set;} //list of current class } here what […]

Next Page »