Showing posts from February, 2012

How to hide generated javascript file in visual studio code

In this post I am going to show you a cool trick in visual studio code. Let's suppose you are writing typescript code in visual studio code and you want to hide generated javascript code.

Create .vscode folder in your folder and then create settings.json file and paste following code

{ "files.exclude": { "node_modules":true, "**/.git": true, "**/.DS_Store": true, "**/*": true, "**/*.js": {"when": "$(basename).ts"}     } }

Calling cross domain wcf service using Jquery

In this post,I will show you how to call cross domain service using jquery.
using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Runtime.Serialization; using System.ServiceModel; using System.IO; using System.ServiceModel.Web; using System.Runtime.Serialization.Json; namespace CorssDomainService { [DataContract] publicclass Order { [DataMember] publicint ID { get; set; } [DataMember] public DateTime OrderDate { get; set; } [DataMember] publicstring Name { get; set; } } [ServiceContract] publicinterface IOrderService { [OperationContract] [WebInvoke(Method = "GET", UriTemplate = "/", ResponseFormat = WebMessageFormat.Json )] string ProcessOrder(); } [ServiceBehavior] publicclass OrderService : IOrderService { [OperationBehavior] publicstring ProcessOrder() { …