Search Posts


Index does not display data from SQL Server

I wanted to do some CRUD operations in ASP.NET web API application. I have connected successfully from index.html to the web API. My goal is to add new items via index.html to database. But, unfortunately, I am not able to display any data on index.html. Could you please check and let me know what I am doing wrong? <label for=”nameAdd”>Album: </label> <input type=”text” class=”form-control” ng-model=”createVM.Name” id=”nameAdd” placeholder=”Wprowadź nazwę albumu” name=”nameAdd” required> </div> <div class=”form-group”> <label […]

Controller is not registered exception when using SystemJS with Typescript in angular JS

I am trying to implement a page using typescript in AngularJS, but I am not sure what mistake I am doing in integrating the controller to the angular. Based on my understanding, controller IIFE is not getting executed though I have specified the System import in the HTML file. Please find the following files Sample.ts file import * as angular from “angular”; export class Sample{ constructor(nme: string) { = nme; } public name: string; […]

Is console.log() a javascript built-in method? [duplicate]

This question already has an answer here: What is console.log? 20 answers I’m working with angular js. My project includes only the angular.min.js file, with no other references of js files like javascript etc. The code which makes request to the server is as follows: var app = angular .module(“myModule”, []) .controller(“myController”, function($scope, $http) { $http.get(“WebService.asmx/GetAllEmployees”) .then(function(response) { $scope.employees =; console.log( }, function(reason) { $scope.error =; }); }); I’m wondering about the following […]

returning null in ASP.Net api from angular4

I literally spent all day to try to find out the solution and none of existing solutions to similar problems, seem to work on my problem even though the problem seems to be the quite similar…. I am doing a POST from angular4 to .net server but the server returns null. server [HttpPost] public string callBcknd([FromBody]string body) { try { Log.Info(string.Format(“{0}”, body)); } catch(Exception ex) { return “error”; } } } angular *note that I […]

Server to server Http request: client promise hangs page

Overview My web application homepage launch some request to my company server which perform a server to server request to retrieve some data from a customer communication bus, but it’s not possible to change page or refresh it until these request are not completed (or closed by timeout). What I’ve tried Following this stackoverflow example and trying to manually reject all the pending ajax request: Everything is rejected except the server to server request which […]

To use keyboard shortcut in list in angularjs

<html> <body> <div ng-app=”mvcapp” ng-controller=”AngularController”> <input ng-keyup=”obj.showList = true;” type=”text” class=”myInput form-control” name=”txtStorename” id=”txtStorename” placeholder=”Search for Store..” title=”Type in a Store” data-error-message=”Please enter StoreName” ng-model=”sname”> <ul ng-if=”obj.showList” id=”myUL” ng-repeat=”StoreList in Store| filter:{StoreName:sname}”> <li ng-click=”SelectedValue(StoreList.StoreName)” ng-cloak>{{StoreList.StoreName}}</li> </ul> <div ng-show=”(Store|filter:sname).length==0″ style=”color:red;font-weight:bold” ng-cloak>No Result Found</div> </div> <script src=””></script> <script> var angular = angular.module(‘mvcapp’, []); angular.controller(‘AngularController’, function ($scope, $http) { $scope.obj = {}; $scope.obj.showList = false; Getallitem() function Getallitem() { $http.get(‘/Coupons/GetStore’).success(function (data) { $scope.Store = data; }); } $scope.SelectedValue […]

Dynamically created TextBox Does not retain values with ng-model attribute

I am creating a TextBox dynamically using the below code. protected void Page_Load(object sender, EventArgs e) { if (!IsPostBack) { TextBox txt = new TextBox(); txt.ID = “txtBox1”; txt.Attributes.Add(“ng-model”, “m_TxtBox1”); pnlTextBoxes.Controls.Add(txt); } } protected void Page_Init(object sender, EventArgs e) { List<string> keys = Request.Form.AllKeys.Where(k => k.Contains(“txtBox1”)).ToList(); foreach (string key in keys) { TextBox txt = new TextBox(); txt.ID = “txtBox1”; txt.Attributes.Add(“ng-model”, “m_TxtBox1”); pnlTextBoxes.Controls.Add(txt); } } protected void DoSomeThing_Click(object sender, EventArgs e) { } The issue […]

call services get error code 404 in asp boiler plate (apb) after added language to route config

I create new project base on ASP Boiler plate (abp). I need to show language code in url. so my route config is : routes.MapHttpRoute( name: “DefaultApi”, routeTemplate: “api/{controller}/{id}”, defaults: new { id = RouteParameter.Optional} ); routes.MapRoute( name: “Default”, url: “{language}/{controller}/{action}/{id}/{title}”, defaults: new { controller = “Home”, action = “Index”, id = UrlParameter.Optional, language = “fa”, title = UrlParameter.Optional } ); and i have front end code based on MVC Multy page that work correctly. […]

Error detail not sent by server AspnetBoilerPlate

enter image description here In Aspnet Boilerplate, Swagger-UI is running at port no 5000 and the angular require port no 21021. so am facing problems. I tried Changing port number in angular code but then it was displaying Response to preflight request doesn’t pass access control check: No ‘Access-Control-Allow-Origin’ header is present on the requested resource.”. So please help me to solve my issue Source: AngularJS

Audio file is not working via FTP upload programatically

I am uploading an .mp3 file via FTP code using C#, the file is uploaded successfully on server but when i bind to a simple audio control or directly view in browser it does not work as expected, whereas when i upload manually on the server it works perfectly. Code: var inputStream = FileUpload1.PostedFile.InputStream; byte[] fileBytes = new byte[inputStream.Length]; inputStream.Read(fileBytes, 0, fileBytes.Length); Note: When i view the file in Firefox it shows MIME type is […]

Next Page »