Posts

Showing posts from 2013

Real Time Web using SignalR

Image
Hi Guys, This time I made a shopping site which works real time. Yes, you heard it right. It is real time. If two users ave connected and one buys something, the other person gets the update without him making any interaction to the Server. Surely the potential of this real time web is limitless. Before you Start, 1) Visual Studio with .NET Framework 4 or higher Step One : The Solution Create a Web application project. Then Right Click on Solution -> Manage NuGet Packages For Solution Then Search for SignalR, Json2 and jquery as shown and then install them. Then make Solution as shown Then Open UpdateStock.js paste the following code. /// <reference path="../Scripts/jquery-1.6.4.min.js" /> /// <reference path="../Scripts/jquery.signalR-2.0.0.js" /> /// <reference path="../Scripts/jquery-ui-1.10.3.js" /> $(function () { //Instance of the Hub var hub =...

Stack Implementation using Managed Extensibility Framework

Image
Hi Guys, This time I made a small application to simulate a basic stack data structure. But to make things interesting I used Managed Extensibility Framework. Before you Start, 1) Visual Studio with .NET Framework 4 or higher (Any Version) Step One : The Solution Create a console application project and a class library as shown in the image. Refer both the projects with System.ComponentModel.Composition. And add a reference to Console Application from the class library. Step Two : The Code Paste the following code in the Program.cs file of MEFClient Project.  using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.ComponentModel.Composition; using System.ComponentModel.Composition.Hosting; namespace MEFClient {     //Stack Implementation      [Export(typeof(IStack))]     class MySimpleStack : IStack     {   ...

Notifications : Service Broker, SqlDependency and NotifyIcon

Image
Hi Guys, This time I made a small application to show notifications using Service Broker (Query Notifications), SqlDependency and NotifyIcon. Before you Start, 1) Sql Server (Any Version) 2) Visual Studio (Any Version) Step One : Enable Service Broker for the Database you work on. Step Two : Add the Following Code in a Console/Windows Application   using System; using System.Collections.Generic; using System.Configuration; using System.Data; using System.Data.SqlClient; using System.Drawing; using System.Linq; using System.Security.Permissions; using System.Text; using System.Threading.Tasks; using System.Windows.Forms; namespace TestApplication {     class Program     {         static void Main(string[] args)         {             //Start the Dependency         ...

HTML 5, Bing Map Control to Show your Current Location

Image
Hi Guys, My this post simply shows you how to use the HTML 5 navigator object and Bing Map Control to show your current location. Before you Start, 1) You need to have an HTML 5 Compatible browser. Duh, almost all the new browsers supports it. 2) A text Editor (Notepad, Wordpad would do) 3) A Bing API Key (You can get one from www.bingmapsportal.com  by registering) Step One : Open the Text Editor and Paste Following HTML and Save it as HTML. <!DOCTYPE HTML>  <html> <head> <meta http-equiv="Content-Type" content="text/html; charset=utf-8"/>       <script type="text/javascript" src=" http://ecn.dev.virtualearth.net/mapcontrol/mapcontrol.ashx?v=7.0"></script >       <script type="text/javascript">       var map = null,lat,lng; function errorHandler() { }               ...

Asynchronous Programming : Sending Mails using async and await in .NET 4.5

Image
Hi Folks, This is Time I am going to tell you how to send mails asynchronously using async and await keywords . Enjoy. Before You Start you must have, - Visual Studio 12 installed Step 1: Create a Console Project in Visual Studio     Step 2: Make Mail Manager Class to Send Asynchronous mails Step 3: Call it using the Console application