Tuesday 28 February 2012

Domain Name Basics: An Introduction

It's amazing how we take things for granted. Take domain names, for instance. Most people know what they are but few understand all of the details involved. These usually do not become evident until a domain name is needed for a Web site.
A domain name is basically a Web site address. For example, "washingtonpost.com" is the address of theWashington Post Web site; it's also the site's domain name.
Note: The entire Web address, i.e., http://www.washingtonpost.com, is known as the URL (Uniform ResourceLocator).
There are three "levels" of domain names. The first level, described in detail below, is the "extension" part of the name, i.e. ".com." The second level would be "washingtonpost.com." The third level would be "www.washingtonpost.com."
Top-Level Domains
A domain name "extension" is called a "top-level domain (TLD)." These are divided into three different categories: generic top-level domains (gTLD), country code top-level domains (ccTLD) and infrastructure top-level domains.
Generic top-level domains are the ones most frequently seen on the Web:
  • .com (originally intended for use by commercial organizations but is available to anyone).
  • .net (originally intended for use by sites directly related to the Internet but is available to anyone).
  • .org (originally intended for use by non-profit organizations but is available to anyone).
  • .edu (used by educational organizations).
  • .gov (reserved for agencies of the United States government).
  • .mil (reserved for the United States military).
  • .int (reserved for international organizations established by treaty. i.e. the European Union: http://europa.eu.int).
  • .aero (reserved for members of the air transport industry).
  • .biz (for use by businesses only).
  • .coop (reserved for cooperative associations).
  • .info.
  • .museum (reserved for museums).
  • .name (reserved for individuals).
  • .pro (being developed for professionals and related entities).
The next top-level domains are the two letter country codes. These are used to designate a country or a dependent territory. For instance, in the URL http://www.telegraph.co.uk, the "uk" represents the United Kingdom. A listing of all country codes can be found on the IANA Web site. IANA (Internet Assigned Numbers Authority) oversees the allocation of all TLD's.
The top-level domain infrastructure is limited to ".arpa" and is used exclusively for Internet-infrastructure purposes. The .arpa designation comes from the United States Department of Defense Advanced ResearchProjects Agency, the government agency which formulated the Internet.
Formatting of Domain Names
Domain names must be at least two characters long and no more than 63 characters maximum, excluding the top level domain. The characters can include any combination of letters, numbers or hyphens. The first and last character cannot be a hyphen. Domain names are not case-sensitive. i.e. "washingtonpost.com" would be the same as "WashingtonPost.com."
IP Addresses
In addition to the domain name, there is also another address for a Web site: the IP (Internet Protocol) number. This is the actual address computers use to connect to the site through the Internet. It is directly linked to the domain name and is regulated by the Internet Corporation for Assigned Names and Numbers (ICANN)
If you were going to visit the physical home office of the Washington Post, you would need to know its physical address. Yet the actual legal description for the property is a different number, similar to using an 800 vanity number. If you want to place a collect phone call, you can dial 1-800-CALL-ATT , which the telephone company's computer translates to 1-800-2255-288 .
The domain name and the IP address act in the same way. Each computer connected to the Internet is assigned a unique number known as an IP address. Developed in the early 1970's, this number serves as the computer's Internet address. An IP address can be either static (permanent) or dynamic (temporary). Most home computers use a dynamic IP address while servers and many other computers use a static IP address. An IP address looks like this: 12.129.147.10. If you were to enter that number in the address bar of your Web browser, you would reach the Web site of the Washington Post.
When you enter "washingtonpost.com" into the address bar of your browser, the computer does a search of the domain name system (DNS), which is maintained by the Internet Corporation for Assigned Names and Numbers (ICANN). The domain name is then translated into the IP number and the computer connects with the Web site.
Registering Domain Names
In order to use a domain name, it must be registered with a registry. ICANN maintains a current directory of accredited registrars. The domain name is registered for a specified period of time. i.e. one year, up to a maximum of ten years, and is renewable on an ongoing basis. When you purchase a domain name, it only belongs to you for the specified time you stated, in this case, one year. As long as you continue to renew it in a timely fashion, it will belong to you. It is important to keep track of the renewal period because if the domain name is not renewed, it can be registered by anyone for their own use.
During the registration process you may be asked for information for different "contacts." i.e., technical, administrative. Your domain name record will be available to the public in what is called a "whois" database (a public database mandated by ICANN). The information is categorized under different areas in order for the proper contact information to be available in any given situation (technical difficulties, copyright infringement, etc.). The contact information can be the same for each position; some registrars will have a check box to enable the duplication of the information in each section. As an example, here is the whois record for the Washington Post.
One caution about registering domain names: just because you register the name does not automatically mean that it's yours. Intellectual property law applies to domain names. For instance, you may not be able to register the domain name "macdonalds.com" just because your last name is MacDonald. Take the case of Don Henley. His name is exactly like that of the rock musician from The Eagles. Mr. Henley wanted a Web site and so he registered the domain name "don-henley.com" and set one up. He even stated on his Web site that he was not the other Don Henley. The other Don Henley, it seems, had problems with it. There is a "donhenley.com" registered to the Henley from the Eagles. According to the whois report, it was registered in 1999. It waspreviously owned by a "cybersquatter." The other domain, "don-henley.com," was registered in 1997. To the best of my knowledge this situation is still unresolved.
Domain Pointing
During the registration process you will be asked where you want the domain name to "point." This is the IP address of the server where your Web site will be located and there should be a primary and secondary server. You can obtain this information from your Web hosting company. There may also be a listing for other optional servers. The registrar may provide the IP addresses of at least two delegated name servers on their site. You can change this if you have your own. It can also be changed later if you change servers.
It should take 48-72 hours for your domain name to be set-up and available via the Web.
Summary
A domain name is nothing more than an alias for the IP address of your Web site. It can also be an important tool in marketing your Web site. Usually your company name or some variation of it works best. Remember this is your Web address. Make it easy for your customers to find you
source: http://www.webreference.com/content/domains/names/index.html

Tuesday 21 February 2012

Width and Height properties

More recent browsers support the following additional units of measurements (Internet Explorer 5.0 and later supports all of these units):

  • cm—Centimeters.

  • em—Size relative to parent element's size. For example, 2em is twice the size of the parent element.

  • ex—Font size relative to the size of the parent font's lowercase x. For example, a font with the size 2ex is twice the size of the lowercase x in the parent font.

  • in—Inches.

  • mm—Millimeters.

  • %—Percentage.

  • pc—A pica represents 12 points.

  • px—Pixels (the default value).

  • pt—Points (1/72 of an inch).

Monday 6 February 2012

What is JIT and how is works ?

Before Microsoft intermediate language (MSIL) can be executed, it must be converted by a .NET Framework just-in-time (JIT) compiler to native code, which is CPU-specific code that runs on the same computer architecture as the JIT compiler.  
Rather than using time and memory to convert all the MSIL in a portable executable (PE) file to native code, it converts the MSIL as it is needed during execution and stores the resulting native code so that it is accessible for subsequent calls.  The runtime supplies another mode of compilation called install-time code generation. The install-time code generation mode converts MSIL to native code just as the regular JIT compiler does, but it converts larger units of code at a time, storing the resulting native code for use when the assembly is subsequently loaded and executed. As part of compiling MSIL to native code, code must pass a verification process unless an administrator has established a security policy that allows code to bypass verification. Verification examines MSIL and metadata to find out whether the code can be determined to be type safe, which means that it is known to access only the memory locations it is authorized to access. 

How to store a dataset in a viewstate?

Storing a DataSet inside of the ViewState is a bad practice. If the DataSet will hold hundred of records the ViewState will become very big and you'll get a panelty of performance in the browser page load.

You can save the data in the Session instead or reload it whenever neccesery.

Storing

viewstate["datasetname"] = ds;

For Retrieving

ds = (dataset) viewstate["datasetname"];