Posts

Showing posts from July, 2011

How to change the Database Connection of LINQ to SQL Class

Image
Introduction Its very common that couple of developers are working on a single project. Me and one of my friend are also working on a .NET project. We are using LINQ to SQL class to query on the database. This is a desktop Windows Form project and we are maintaining our code as dumbest way possible. That is, when i update on any part, i just mail him the file and he replaces the file. So far so good. Problem statement But when I sent him my project, he couldn't run the database queries. Because the connection string embed on the DataContext.dbml class was not changed. He couldn't find a good way to change the connection string value. So I was searching for a better solution, and at last I found it today. Solution 1. Double click on the DBML file of your project.   2. Now right click on the work area of the DBML file (Start sign in the image) 3. Expand the connection property and check the Data Source value. in my case, it is 'Magicbox' since it is my machin

HTML Document Object Model

Image
What is it? The HTML DOM defines a standard way for accessing and manipulating HTML documents. The DOM presents an HTML document as a tree-structure. In the DOM, everything in an HTML document is a node. The DOM says: The entire document is a document node Every HTML element is an element node The text in the HTML elements are text nodes Every HTML attribute is an attribute node Comments are comment nodes Example Node tree: From the HTML above: The < html > node has no parent node; it is the root node The parent node of the < head > and < body > nodes is the < html > node The parent node of the "Hello world!" text node is the < p > node and: The < html > node has two child nodes; < head > and < body > The < head > node has one child node; the < title > node The < title > node also has one child node; the text node "DOM Tutorial" The < h1 > and < p > nodes are siblings, a