Posts

Cascading Dropdownlist in MVC3- the ajax way

Image
Creating a dropdownlist the ajax way using jQuery is kind of messy. Ajax Helpers in MVC3 has an elegant alternative using unobtrusive jquery. Lets first create a simple page with ajax form The  UpdateTargetId  property of the AjaxOptions says where the partial view is to be inserted on form submit. The corresponding controller will be Create a partial view that will hold the second dropdownlist like this Now one last important thing do not forget to include the unobtrusive script in your layout page In this example when we have binded the on change of event so that the form it is contained in is posted. The argument name of the method SelectFromDDL1  and the id of dropdownlist should be the same so that it is posted when the form is submitted. Using the same  you can create any number of cascading dropdownlists. 

Unleashing Javascript

Image
One world One language This post is about advent of the javascript. Have you ever imagined what would happen if we were to have only ONE language... WOW!.. It would have been a great place without doubt every single being in this world talking, singing, thinking, etc., in one language. In the world of development if it were one language it would sure have been Javascript, looking at the pace of development in this language seems like that day is not so far. I personally did not favour javascript only for the reason it being ugly because of Duck_typing  (not only me many out there think the same even Robert Cailliau ), well looking at it from the point i stood was wrong until, i found the real inner power it had hidden under its sleeves. Javascript is the only language most of developers have got their hands on apart from their "bread earning language".  So here is a small list of frameworks to start with that will enchant you with its magical powers. Node.J

KISS Tabular View

Image
KISS- Keep it Simple Stupid This post is about a simple html tabular view using bootstrap  and a kind of raw grid with sort & search option using ASP.MVC framework. I always like to keep a lot of things (not everything) simple, not that i don't like owning NOT so simple things ;)  From development perspective the KISS principle has been spreading lately. Simplicity, the first thing that pops up when i hear that word, it would be Google . Well in fact "simple" is more like "beauty" it's in the eye of the beholder. Here is a sample whose idea on simple contradict with that of mine. May be we can't jump into conclusion that if something is simple to someone it is the same for the other. So on that same idea of Simple i will try to make a simple page with a simple grid with simple lines of code. Here is simple table which has got nothing to do with this post. Let us Create trivial class Employee like this Now lets create a PersonContro

Facebook App & Google Drive forms

Image
In this post i will just walk through on creating a Google Form on Facebook app platform. " Nothing is discovered until you explore " The above stated might not hold good for all but most of the time it is so true. Recently one of the developer wanted to know how much of a work is involved to create a simple form as a facebook app, then i wondered why haven't i still not explored! this yet ? May be i was too busy (or acting busy) with some other techinical explorations. Logically thinking, assumed there would be simple WYSIWYG  where i can drag and drop a controls, as in Google Drive forms. Turns out that there is nothing like that but in a developer perspective far better. There was just a canvas in which the developer was allowed to play his own games. PART-1 (Creating the Facebook app) : Just had to login into Facebook as Developer Goto apps Click on create new app Enter the captcha (this part always makes me feel not so human, its so h

Mono for Android is Awesome!!

Image
Its been an Android era. Every six out of ten persons was an android developer. This explosion has sent shock waves on the Desktop computing world, Cell phones possess more computing power than the Desktops (atleast in my case ;-) ). Android is still enchanting developers including .NET developers, In this post like a thousand post out on the internet, will sum up a little bit about  "Mono for Android" . The second thought would cross a .NET mind before starting developing apps is the learning curve involved for studying the IDE & Java. This won't be a barrier anymore as we can start developing apps using C# in our own home ground Visual Studio. Before you start anything on this cool framework read this . The Mono and the Dalvik  are the real heroes who do the work using C without whom it would have to a bit hard not impossible. Le me share some snippets which would be required to start with (For detailed docs refer this  docs) Designing a view is simi

Google Drive

Image
To be honest Google is good at keeping secrets even with 30,000 employees ;)    But there are nerds who dig through all the way to the bottom. Google has been lately cooking something on "Google Drive". Google drive will be more like Dropbox  or Box  a place in the cloud where all different kinds of files will be stored. Well we have the same as of now on Google Docs  but more presentable. May be we even will get a client app so that it will sync the local files with the cloud. Today i stumbled upon some secret Google's been working on. Well seems like there is some trouble with this link http:\\beta.google.com . this link is acting weird today may be soon we will get to see the drive, and moreover the link is alive for sure. This link shows secret is not really secret anymore ;) 

Chat application using SignalR

Image
I know what is magic about now, its just that it somehow works and we don't know how. So was this chat app a magic for me, until yesterday when i got to know how it works. In this post we will try to create a chat application that works with approximately 10-12 lines of real code. ( i am sure we can write that in one line too ;) ) The chat recipe goes like this Ingredient: SingnalR is solution for ASP.NET which lets communicate with client and the server-side with JS and ASP.NET. MVC3 Procedure: Create an empty MVC application ( Which is not really empty) Create a HomeController by right clicking on the controller folder Install latest Jquery and SignalR using Nuget Now create a model Communicator which inherits the Hub from SignalR just like this on the html side do this There's your tasty treat :)  Server-side: uses the dynamic object to call the function defined on the client side. Client-side: client creates an object of the communi