A post I forgot to publish which I wrote an year back

Here I wanted to show you the flexibility of JQuery.

Below is a HTML code that generates a grid with two rows and ten columns. Read the rest of this entry »

Recently I read about Text Template Transformation Toolkit (T4), I was really amazed by this because I thought only CodeDOM was the only way to generate code.

Text Template Transformation Toolkit (T4) is template based code generation engine which comes with Visual Studio 2008(It is not a framework feature).

This simple example shows how powerful it is -

if you have a string array and you want to generate a strongly typed enum from this.

Steps

1) Open up VS 2008 and Create a project.

Read the rest of this entry »

You want to create simple GUI cross platform application without knowing the high level programming languages like C++, Java, C#~(using mono)? XUL is that answer.

Yes it is possible using XUL, the prerequisites  for this is, knowledge of a declarative programming language(like HTML or XHTML, XAML etc…) and JavaScript.

XUL is basic building block of the Firefox UI and as we know Firefox works in Windows, Linux and MAC.

Actually XUL is a language which run on the XULRunner(Gecko) runtime from Mozilla.

If you really wants see how Firefox created this UI, go the FireFox installation folder. Normally it will be “C:\Program Files\Mozilla Firefox\”. Under that installation root folder, find a folder named “chrome”. Firefox has packaged the xul files in a zip format and they have renamed it as “.jar”. So look for a file “browser.jar” and rename it to zip. Extract it and have a look at “content\browser\browser.xul”. This file holds the UI definition for Firefox.

To learn more about XUL, refer these web sites

1. http://www.mozilla.org/projects/xul/
2. http://www.ibm.com/developerworks/web/library/wa-xul1/

  1. Part 1- Calling server side methods from client side

Read the Part 1 of this tutorial if you don’t know how to call server side methods directly from client side.

In this post, I will explain how to pass data from client to server in JSON format.

Microsoft AJAX client library has built-in methods which helps in serializing and de-serializing JSON. The methods are defined in "Sys.Serialization.JavaScriptSerializer" class. In server side we have "JavaScriptSerializer"that will help you out to do the JSON serialization and de-serialization.

Read the rest of this entry »

ASP.net AJAX has got nice bridging between your server side and client side technologies. Using the ASP.net AJAX you can easily call a method in a page. The restriction here is that, the methods your are trying to call should be static and public.

This feature(calling server side static method) is not enabled by default, so you have to manually enable this and it is very very simple; just set the "EnablePageMethods" property of the "ScriptManager" to true like this

Read the rest of this entry »

top