Tuesday, January 4, 2011

Difference between name and id in html tag

bottom line:
- Form elements must have a name if you want them to be submitted
- Use id only if you need to refer to an element by getElementById
- Many programmers put the same name and ID on form elements

When Netscape created JavaScript, they used "name" to identify
elements. MS built IE to copy Netscape, so also supported "name".

However, the HTML spec decided to use id to identify elements but keep
name for backwards compatibility. Name still applies to form elements
and lots of others (e.g. name is mandatory on PARAM elements). MS seem
to hate ever removing functionality, so they continue to support name
as if it was ID.

Many programmers put the same name and ID on form elements. This isn't
required, but may be helpful if you intend to reference the element
using both the forms.elements collection and getElementById.

"When a form is submitted for processing, some controls have
their name paired with their current value and these pairs
are submitted with the form. Those controls for which
name/value pairs are submitted are called successful

Make Client IDs easy for Javascript in ASP.NET 4 Web Forms and VS 2010

Cleaner HTML Markup with ASP.NET 4 Web Forms - Client IDs (VS 2010 and .NET 4.0 Series)

Is ASP.net MVC a copy of Ruby on Rails?

- MVC is the Pattern name,  which follow by two frameworks
- ASP.NET MVC 1.0 release date: 13 March 2009
- Ruby on Rails 1.0 release date: December 13, 2005

Other than design pattern,  this two are totally different animals.
As a established developer, you cannot transfer one framework to another very easily.

ScottGu's “Best of 2010” Posts


We shipped ASP.NET MVC 2 in March, and started previewing ASP.NET MVC 3 this summer.  ASP.NET MVC 3 will RTM in less than 2 weeks from today: