Learn HTML 5 in 3 days – Day 1

This article will cover following topic:

  • Introduction to HTML 5
  • What is difference between SGML, HTML and XML?
  • What is Doc type?
  • How HTML 5 is different from previous versions?
  • HTML 5 New features
  • Lab 1 – Understanding new Page structure semantics
  • Lab 2 – Demo with New Input attributes
  • Lab 3 – Understanding HTML 5 Datalist control
  • Lab 4 – Output element
  • Lab 5 – implement validation using “type” attribute of input element
  • Lab 6 – Implementing validation using custom validation attributes
  • Lab 7 – Customizing validation
  • Lab 8 – Simple Application Cache Demo
  • Lab 9 – Solve the double refresh problem
  • Lab 10– Understand more about manifest
  • Lab 11 – Importance of NETWORK section

Read Full Article – http://www.codeproject.com/Articles/827673/Learn-HTML-in-days-Day

Hope this will help !!!

Jay Ganesh

About these ads

All About C# Access Modifiers

Access modifiers (or access specifiers) are keywords in object-oriented languages that set the accessibility of classes, methods, and other members. Access modifiers are a specific part of programming language syntax used to facilitate the encapsulation of components.

Summary of the article:

1) The default access modifier is private for class members.
2) A class marked as internal can have its access limited to the current assembly only.
3) Namespaces as we see by default can have no accessibility specifiers at all. They are by default public and we cannot add any other access modifier including public again too.
4) A class can only be public or internal. It cannot be marked as protected or private. The default is internal for the class.
5) Members of a class can be marked with all the access modifiers, and the default access modifier is private.
6) Protected internal means that the derived class and the class within the same source code file can have access.
7) Between public and internal, public always allows greater access to its members.
8) Base class always allows more accessibility than the derived class.
9) The return values of a method must have greater accessibility than that of the method itself.
10) A class marked sealed can’t act as a base class to any other class.
11) Since we cannot derive from sealed classes, the code from the sealed classes cannot be overridden.
12) We need to initialize the const variable at the time we create it. We are not allowed to initialize it later in our code or program.
13) Like classes, const variables cannot be circular, i.e., they cannot depend on each other.
14) A const field of a reference type other than string can only be initialized with null.
15) One can only initialize a const variable to a compile time value, i.e., a value available to the compiler while it is executing.
16) A constant by default is static and we can’t use the instance reference, i.e., a name to reference a const. A const has to be static as no one will be allowed to make any changes to a const variable.
17) A const variable cannot be marked as static.
18) A variable in C# can never have an uninitialized value.
19) Static variables are always initialized when the class is loaded first. An int is given a default value of zero and a bool is given a default of False.
20) An instance variable is always initialized at the time of creation of its instance.
21) A static readonly field cannot be assigned to (except in a static constructor or a variable initializer).

Rad full article

Jay Ganesh

Get all the column names from Table

Recently, I was looking for all the column names from table and want to use them in select query. My table has total 70 column names so i thought why to type it. Why not query the syscolumns table and fetch those names.

Here is the script that will do the trick:


--Get column related information from table
SELECT * FROM Northwind.INFORMATION_SCHEMA.COLUMNS
WHERE TABLE_NAME = N'Customers'

--Get all the column names from Table
SELECT [name] AS [Column Name]
FROM syscolumns
WHERE id = (
		SELECT id
		FROM sysobjects
		WHERE type = 'U'
			AND [Name] = 'TableName'
		)

--Get all the columns from View
SELECT [name] AS [Column Name]
FROM syscolumns
WHERE id = (
		SELECT id
		FROM sysobjects
		WHERE type = 'V'
			AND [Name] = 'ViewName'
		)

--Get Comma separated column names from Table/View
DECLARE @ColumnList VARCHAR(max)

SELECT @ColumnList = COALESCE(@ColumnList + ', ', '') + CAST([name] AS VARCHAR(max))
FROM syscolumns
WHERE id = (
		SELECT id
		FROM sysobjects
		WHERE type = 'U'
			AND [Name] = 'TableName'
		)

SELECT @ColumnList

Hope this will help !!!

Jay Ganesh

CRUD Operations Using the Generic Repository Pattern and Unit of Work in MVC

This article introduces the Generic Repository pattern and Unit of Work in ASP.NET MVC applications. We are developing an application for a Book entity on which we can do Create, Read, Update and Delete operations. To keep the article simple and to make it easy to understand, the Generic Repository pattern and Unit of Work, we use a single book entity in the application.

Read Full Article Here.

Hope this will help !!!

Jay Ganesh