Skip to main content

Posts

Showing posts from January, 2011

How to use jquery dialog in asp.net

In this post I am going to show you how to use jquery model dialog in asp.net.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="john@doe.com"},                 new Person{Name="Admin",Email="admin@doe.com"},             };         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…