Friday, August 26, 2011

What is JSON?

JSON stand for Java Script Object Notation, is a text base format, that contains the value in key value pair.

JSON can be used as

var objJSON = {"bindings": [
{"ircEvent": "PRIVMSG", "method": "newURI", "regex": "^http://.*"},
{"ircEvent": "PRIVMSG", "method": "deleteURI", "regex": "^delete.*"},
{"ircEvent": "PRIVMSG", "method": "randomURI", "regex": "^random.*"}
In this example, an object is created containing a single member "bindings", which contains an array containing three objects, each containing "ircEvent", "method", and "regex" members.

Members can be retrieved using dot or subscript operators.

objJSON.bindings[0].method // "newURI"

Friday, August 19, 2011

Force User to Check in the code

My machine has been corrupted. Thank God mostly projects were checked in. I have lost some project code which was not checked in. Than I really feel the importance of VSS. Than I have found a option in Visual Studio which force you to check in your code before closing your project. I would like share it with you people.

Go to Tools- Option

A dialog box will open for you select Source Control -- Environment

After selecting Environment check the option (Enclosed in Red Color Box) “Check Everything When Closing Solution or Project”.

Friday, August 12, 2011

Active Directory

What is Active Directory?
An Active Directory is a service that stores information about items on Network so the information can be easily made available through a logon a process or Network Administrator. You can view entire network object from a single point using Active Directory.

Active Directory performs a variety of task which includes providing information on objects such as Hardware and Printer and services for the end users on the Network.

What is the use of Active Directory?
In network environment it is crucial to control access to each network device easily. A method is needed to control who has access to which device and when.This includes printers, files and another local network resource or item on distributed network.

AD is simply hierarchical database that represents al of your network resources.

In .Net there is System.DirectoryServices namespace through which you can manage Active Directory in .Net.

Friday, August 5, 2011

Find Element name on MouseDown IE-8

Yesterday I was working on click even of WebBrowser Control(HtmlDocument). I need to find element name on mouse down event. I have used simple method of WebBrowser

HtmlElement objHtmElem = objWebBrwser.Document.GetElementFromPoint(e.MousePosition);

It was working fine in IE-5. But when I have installed IE-8. All the functionality has been disturbed. On mouse down it was giving Document Element name no matter matter where you have down your mouse.

After lot of googling I have solved the problem. Actually where we have used e.MousePosition we must use e.ClientMousePostion like..

HtmlElement objHtmElem = objWebBrwser.Document.GetElementFromPoint(e.ClientMousePosition);

This works fine for both browser(IE-5 and IE-8).