Search Posts

Category: c#

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 […]

C# Unable to initiate auto download attachment of a sent string [duplicate]

This question already has an answer here: Return file from ASP.NET 5 Web API 3 answers Return file in ASP.Net Core Web API 1 answer I’m new to c# and trying to pass a simple object to the server (web api) and initiate auto download as attachment. Right now I’m getting 404, can’t figure out what the problem is. Please advise. The relevant code in the front (angular 1): then((res:any) => { let strObj={ […]

create Facebook type comment system in angularJS

<div class=”row”> <div class=”form-group col-sm-12″> <div class=”input-group input-group-sm”> <span class=”input-group-addon”> <span class=”glyphicon glyphicon-hand-left”></span> </span> <a href=”blog” title=”Back To Blog” class=”btn btn-success form-control”><span>Back To Blog</span></a> </div> </div> </div> <div class=”row”> <div class=”col-sm-12″> <div class=”well well-sm”> <div class=”row”> <div class=”col-md-12″> <img ng-src=”{{}}” class=”img-responsive img-rounded well-image” /> </div> </div> <div class=”row”> <div class=”col-md-12 text-center” style=”font-family: Rockwell; font-size: 14px; letter-spacing: 2px;”> <h2 class=”h4″>{{}}</h2> </div> </div> <form class=”comment-form”> <div class=”row”> <div class=”col-md-12″> <p style=”font-size: 12px; font-family: Arial;”> {{}} </p> </div> […]

how to convert datetime formate into date in mvc angularjs [duplicate]

This question already has an answer here: Correctly format ASP.NET MVC dates for AngularJS 4 answers i add data into database like this or.Date = DateTime.Now; or.Inches = item.Inches; or.note = not; or.paid = pad; or.ProductDes = item.ProductDes; or.ProductId = item.Id; or.ProductName = item.ProductName; or.ProductQty = item.ProductQty; or.ProductRate = item.ProductRate; or.SaleProduct = item.SaleProduct; db.orders.Add(or); db.SaveChanges(); date saved into database this form 08/06/2018 11:18:10 now i get all the data but date formate is not in […]

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 […]

Calling MVC Action From ngBlur Event

I am trying to update a model property called State.TransactionProcessingIds.EventInstanceName from within a nb-blur directive by calling a controller’s action method in C#. The following is in my view: <md-input-container> <input name=”EventInstanceId” type=”text” ng-blur=”$‘/InternalDonations/Test’).success(function (data) { State.TransactionProcessingIds.EventInstanceName = data; });”> </md-input-container> and I have the following controller and action method: public class InternalDonationsController : Controller { public string Test() { return “test123”; } } The ngBlur event fires when the textbox loses focus, however when […]

How to host single page application on the local server and backend on remote server using IIS? [on hold]

As a front-end developer, I have various SPA projects, written in Angular 1.4 and Angular 6. I want to run the front end part on my local server and point to backend part depends on the project. What are the steps to configure the application using IIS suppose that the application backend based C#? I am using VSCode as IDE. Source: AngularJS

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: […]

Next Page »