Showing posts from January, 2011

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"}     } }

How to use jquery dialog in

In this post I am going to show you how to use jquery model dialog in Note:Please make sure that you have downloaded the jquery and jqueyui   library.

Start visual studioSelect File/New ProjectChoose a Web Site Template -for this example I used Empty Web Site Right click on empty web site and add new class named Person.cs and paste following code

using System; using System.Collections.Generic; using System.Linq; using System.Web; publicclass Person {     publicstring Name { get; set; }     publicstring Email { get; set; }     publicstatic List<Person> GetAll()     {         List<Person> list = new List<Person>()             {                 new Person{Name="John",Email=""},                 new Person{Name="Admin",Email=""},             };         HttpContext.Current.Session["Add"] = list;         return list;     } }
Right click on empty website and add new item (Ajax Enabled WCF Serv…

How to: Return multiple response from wcf

Imagine you have a wcf application that return xml response but after some time your requirements changed that we want to return multiple response (XML /Json) from the same service.How do you achieved this? Earlier it was nightmare for developer to return multiple response from .net. Now you have a good news that you can return multiple response from wcf 4.0 with a very minimal changes.

So In this post I am going to show you how to return multiple response from wcf in .net framework 4.0

Open visual studio and create an empty website.

Right click on the website project and add a new wcf service.It will create three files named Service.svc,IService and Service.cs. Open IService.cs file and paste the following code

Open Service.cs file and add following code
Right click on App_Code folder and add new class named Person and add following code(This class contains dummy data for demo purpose only ) Till now whaterver I have created so for is normal process for creating wcf service applicatio…