ASP.NET Themes and Skins

As Far as the themes are concerned, they are the collection of property settings that defines the pages as well as how they will look like and then make it a consistent look for all or selected web pages throughout the web application. This saves lots of time and also makes the web application look more beautiful than before.

These themes are made up of skins, cascading style sheet (CSS), images and other resources. They are being defined in special directories on the web servers.

Let us first consider the skins and find out that what they really are? As far the skins are concerned they are saved with the file name extension of .skin. It contains the property settings for individual controls which are button, text box, label, list box and in fact all the markups throughout the project.

As an example take the following code:
<asp: button run at=”server” Back Color=”light blue” Fore Color=”black”/>

You can create the .skin files in the theme folder. It is on your choice that you define the skin in different files for each control. Or there is one more choice as well. You can define all the skins for all the controls in one file of theme.

There are two kinds of skin which are as follows:

  1. Default skins.
  2. Named skins.

Cascading style sheets (CSS)
The Cascading style sheet is a style sheet language which is used to describe the presentation of the document which is written in any markup language like HTML or DHTML. The styles explain the computer how to display the HTML elements. All these styles are stored in the style sheet. And all these styles were added to the HTML 4.0 in order to solve the problem of presentation. However it was realized that the external style sheets can save a lot of time for you. All these external style sheets are saved in the CSS files. You should also note that the multiple style sheets would cascade into one according to one rule which I will discuss shortly.

All of the above details really explain that the themes are one of the most important parts of any project. You must have heard about the template. Theme is also a kind of template. There is nothing so new about the theme.

However there are two types of themes respectively as follows:

  1. Page themes.
  2. Global themes.

This difference between these two themes is quiet simple. As far as the page themes are concerned they can be applied to a single page whereas the global themes can be applied to all the pages in the project.

I really feel that themes are skins have revolutionized the web world and you should know about it.

AJAX Programming

Ajax which is sometimes written as AJAX is the shorthand for the asynchronous JavaScript and XML is a set of interrelated web technologies which are used for the interactive web technologies and rich internet application. If you will use the AJAX then you have one extraordinary application of technology with you. You can now in fact asynchronously change the content of the web page by connecting to the server without actually interfering the display and behavior of the existing page. This is really an incredible achievement in the field of web development through AJAX.

Now you can implement the interactive animation on the web page with an ease and hence making the web page look more dynamic.

Ingredient technologies
You should note that the AJAX is not a technology. In fact it is a group of technology and that list of technologies are as follows:

  • The dynamic object display which is used for the dynamic display of the data as well as dynamic interaction with the data.
  • The XHTML and CSS which are used for presentation.
  • The XML as well as XSLT which are used for interchange manipulate and display of data.
  • The XmlHttpRequest for the asynchronous communication. You must know that this technology is not new and in fact it was used way back in 90’s through Java applets.
  • And at last the Java script was being used to bring all the technologies together.

Ajax engine
You should know that the Ajax engine works with the web browser through the DOM and the JavaScript). It keeps a record of the request made by the user to the server. The magic with the Ajax engine is that it holds most of the information in the engine itself and meanwhile also allowing the interaction between the customer and the application to happen asynchronously and this is independent of any interaction with the server.

You should note that the Google map uses the Ajax. Just scroll around the Google map for some time and you will find that it updates even before the flip of your eyes.

Data transfer not dependent to the action of customer!
This is really one of the most important features of the Ajax. You must remember that before all the web application used to be synchronous. But with Ajax it is a bit different and much to the liking of the customer as well as programmer. Everything happens asynchronously. Keeping all the advantages apart, there is one more advantage and that is of speed.

The web page using the Ajax technology loads much faster than the other pages. The terrific example is the Google map which loads within few seconds and updates very fast. Hence Ajax is really a future technology.

Cascading Style Sheets

The Cascading style sheet is a style sheet language which is used to describe the presentation of the document which is written in any markup language like HTML or DHTML. The styles explain the computer how to display the HTML elements. All these styles are stored in the style sheet. And all these styles were added to the HTML 4.0 in order to solve the problem of presentation. However it was realized that the external style sheets can save a lot of time for you. All these external style sheets are saved in the CSS files. You should also note that the multiple style sheets would cascade into one according to one rule which I will discuss shortly.

I would like to explain the CSS with the theme example. You must have noticed most of the site today providing the themes and you can use any one. You can take the example of the Gmail, AOL, Face book and many sites. Even yahoo is now providing themes. With so many sites providing themes I am quiet assured that you must have used the theme. Hence you must have noticed that there is no change in the content. Only the presentation format is changed. Only the properties like font, color, background, foreground etc changes. This is what the CSS does. In fact the theme is also a kind of the CSS file which has really revolutionized the web market at present.

I do feel that now you must have got the idea about the CSS. Now I would like to answer one of the question which I didn’t answered a paragraph ago. The question was how multiple style sheets would cascade. The answer is according to the following order:

  1. Browser default.
  2. External style sheet.
  3. Internal style sheet.
  4. Inline style.

I hope now you have got the answer.

Uses of CSS
Do you know what the presentational attribute are? I would explain it for you. The presentational attributes are the attributes which can be left for the user to decide that how he would like it to be. Some of them are: font colors, background styles, element alignments, border and sizes, which has to be described explicitly.

The CSS allows the description of these presentational attributes on the separate style sheets which can result into a much simpler HTML markup. The CSS separates the presentation from the structure. The CSS can define color, font, text alignment, size, border, spacing, layout and many of the typographic characteristic.

The CSS information can be provided by number of sources. It can be attached as a separate document.  However it can also be embedded in the HTML document. Anyway it is simply a revolution in the field of web technology.

ASP Syntax

You must know that if any website is made in the ASP then you cannot see the source code by selecting the view source button in the browser. This has a reason behind it. Actually this happen because the scripts are executed on the server and only after that the result is sent back to the browser. Hence it becomes quiet difficult to do the coding because you hardly get any code sample of any web site being built in asp.net.

Here I am presenting with the ASP syntax which will definitely help you out to understand how the coding is done in the ASP.net.

An ASP.net file generally contains the HTML tags which are just like an HTML file. However an ASP.net file can also contain the server scripts which is generally surrounded by the <% %>. The server scripts are always executed on the server and can contain the expressions, statement, procedure and operators which are valid according to the scripting language which you are using.

I will explain it for you. For example if one has to print something on the browser then he will have to use the command response.write(). For example you will have to write the code like this.

<html>
<body>
<% response.write(”Hello World!”)%>
</body>
</html>

In this way you will be able to print the words hello world on the browser. This is generally the short hand form of printing anything on the browser using the response.write command.
You can also print using the following code. The code is as follows:

<html>
<body>
<%=”Hello World!”%>
</body>
</html>

Even in this code you are printing the words hello world. But in this case you are using the scripting language. By default the scripting language is set to VB script. Hence in the above coding example the programmer has used the VB script. However you can also use the java script as well. The coding in that case will be however slightly different. The code is as follows:

<%@ language=”javascript”%>
<html>
<body>
<%Response.Write(”Hello World!”)%>
</body>
</html>

You must know that the scripting languages which are being used in the asp.net are only VB script or Jscript. However if you want to use the other scripting languages like PERL, PYTHON etc then I do feel and so would all  that you will have to load the script engine.

Without the script engines, you will not be able to use the scripting languages other than the VB script and Java script. You must also know that the default scripting language is the VB script and hence if you want to use the VB script then you do not use to state that you are going to use the VB script.

ASP Variables and Procedures

A variable is generally used to store the information. If a variable is declared inside the procedure then it is created every time the procedure is called and destroyed every time it is being destroyed. This is quiet simple and you will definitely find it similar to the variables in the other languages like C and C++. There we talk about the scope of the variables. And what we are talking about the ASP here is quiet similar to the scope of the variables in C and C++.

If you want to know about the lifetime of the variables in the ASP.NET then I will insist you to read below.

Lifetime of the ASP variables
If you want to know about the ASP variable scope then you will have to keep following things in mind.

The points are as follows:

  1. The ASP variable declared out side the procedure can be accessed and changed by any scripts in the ASP files.
  2. A variable which is declared inside any procedure is created every time the procedure is called and it is meanwhile also destroyed. Hence the creation and the destruction of the variables take place simultaneously every time the procedure is being loaded and destroyed.

In order to declare the asp variables which can be accessible to more than one asp files then you will have to keep in mind the following things. In fact you will have to declare it as a session variable or the application variable. I do feel that you must be willing to know about the session variables or the application variables.

They are defined as follows:

1. Session Variables
The session variables are being used to store information about one single user and this are available to all pages in one application. Typically the information stored in the session variables is the name, ID and preferences.

2. Application variables
Application variables are also available to all pages in one application. Application variables are used to store the information about the all users in a specific application.

ASP procedures
In the ASP procedure either you can call the java scripts from a VB scripts and vice versa.
The asp source code can contain the procedures and functions. I would like to write one code for you. It is as follows:
<html>
<head>
<%sub vbproc(num1,num2)
response.write(num1*num2)
end sub%>
</head>
<body>

<p>Result: <%call vbproc(3,4)%></p>
</body>
</html>

From the above code it is quiet clear that how we have to use the use the procedures in the asp.net. It is also quiet clear that there is only a slight change in the format which we have to use in the VB script as well as the java script.

10 Steps to Start Your Web Hosting Company

Its really does not matter that who you are, I must say that you will definitely find it quiet profitable to start your own web hosting company. And this can really chose to be a very good business for you.

You will have to follow the following steps to start your own Web Hosting Company:

  1. The first step is to choose the operating system. I do feel that the UNIX is the open source program that is less expensive than the windows and it is quiet a stable environment. Most of the programs can run on both the operating system like Perl/CGI, PHP and Flash. However the technologies like ASP.NET and MS SQL is supported by only windows. However it is quiet self understood that the UNIX as well as the Linux is quiet cheap.
  2. The second step is to choose the web hosting provider. This could be the most important question which will come across you in the process of building your own web hosting company. you will have to look for the customer support, the platform and the control panel, the companies reputation and also how experience the company is.
  3. The next step is to set up your web hosting plans and then decide on the monthly pricing. You can have the smaller plans, medium plans and the high end web hosting plans. At most you can offer four or five different web hosting plans.
  4. The next step is to choose the control panel which you are going to use. The control panel can range from very simple and user friendly to quiet a complex one. You should choose one which is quiet simple to use and at the same time rich in different features.
  5. The next step is to develop the website if you want all of the clients to buy the web hosting from you. You should make sure that your web hosting website is quiet good. If you are not comfortable at designing the website then you should hire some of the professional to design one for you. You should definitely avoid the templates and you should try to use the unique design.
  6. You should also make sure that your website is able to accept the payment online. For this you will have to get an SSL certificate, a merchant account and a payment gateway.
  7. You will have to develop your own helpdesk.
  8. You will have to develop a system for the client billing. Generally you will have to make this sure while you are selecting the control panel.
  9. Create a business plan.
  10. And the last but not the least you will have to do the marketing of your new business.

And that’s it, in this way you will be able to develop your new web hosting business.

How to Install the IIS in Windows XP

IIS is the Microsoft acronyms for the internet information services. IIS is a suit of tools and services for creating, managing and developing a web server. As a web developer you will need a web server for your development environment. You can develop with a remote server but I really feel that it is quiet easy to develop and maintain the websites and web development software on the Internet information services.

Web based scripting can be created in the programming languages such as the asp.net, Perl, PHP, python, JSP and so on. For the web development you will require the server side processing and hence the client server programming and for this you will require the server. The IIS acts as the server for the same. I must say that you will definitely find it very useful.

The question now arises that how can you really install the IIS. The answer is simple and I do find pleasure in saying that you can easily install the IIS on your computer. Generally the following steps are really required to be followed and I must say that you will definitely find it quiet easy.

The steps are as follows:

  1. Firstly you will have to click on my computer and then click on the control panel. Actually the control panel contains the add remove program which is really to be used.
  2. The second step is to select the add remove program and then click on the add window component. You will then receive a list of programs. You will have to select the internet information service from the same and I must say that you will then have to click on the install button. Your IIS will start installing.
  3. I really feel that you will then be able to install the IIS. Sometimes however the windows installation CD is required. However you should really not worry. Your only job will be to insert the windows CD into the CD drive and rest of the job will be automatically done.
  4. Now click on the IIS and then open the properties panel, select the Documents tab. In the Default Document listing box use the Add button to add index.htm and index.html. Now use the up and down arrow buttons on the left side to reorder the listing. Place the index.htm and index.html at the top and either move down or remove the iisstart.asp listing. Make sure you remember to hit the Apply button. Now whenever you place an index.htm in any folder, the web server will know that it’s the default document and if available, it will serve it first in the directory.

In this way you will be able to install the IIS and then use it in the way which you would like.

ASP .NET Maintaining the View State

When we load a form in the classic ASP then the form really does not carry any form value being entered. Just think of the situation that when you have filled many fields of the form and you are about to finish it and suddenly the server comes up with the run time error. How will you feel then? I must say that you would definitely go red with anger. I must say that all the form values will be cleared and you will have to type yet again. This will really add a huge task in your list. And just suppose that this happens twice or thrice. I would definitely say that you will definitely not be able to believe it and your anger will reach its zenith.

This is what really happened when we did the coding in the classic ASP. However I must tell you that the ASP.NET was able to omit this disadvantage of the classic ASP. The question arises that how it was able to clarify this problem. I must say that it made it possible through the use of the view state. When a form is submitted in the ASP.NET then the form again reappears with all the values which we have submitted in the previous round.

This is because the ASP.NET maintains your view state. The view state indicates the status of the form to the server. Now you must have the question that how is it really possible. I must say that you will be able to do it through the following process.

Because the view state is packed with the page, it inevitably adds a few extra kilobytes of data to the payload. A complex, real-world page-especially one that does not optimize and restrict the use of the view state-can easily find 10KB of extra stuff packed in the HTML code sent to the browser. Because it’s composed of plain text, the view state could be tampered with. Although programmers are not supposed to store sensitive data in the view state (credit card numbers, passwords, or connection strings, for example), it goes without saying that the view state can be used to carry out attacks on the server.

The question arises that how can we code the view state. I am writing the code for the view state:

1. How to enable the view state

First you must have a server side form. By default the view state is enabled.
The code goes like this:
<pages enableViewState=”true” enableViewStateMac=”true” … />

2. How to disable the view state

The code goes like this:
<asp:Label id=Label1 runat=”server” EnableViewState=”false” />

The study clearly explains that you will have to set the enable view state property in order to enable and disable the view state. I must say that this is really a plus point of the ASP.NET over the classic ASP.

ASP.NET Development Benefits

After the implementation of the internet information services in the year 1997 the Microsoft started to look for some web application which could remove the flaws of the classic ASP especially with regards to the separation of the presentation and the content so that one is able to write the clean code.

Mark Anders explained on an appearance on The MSDN Show that year that, “The .NET initiative is really about a number of factors, it’s about delivering software as a service, it’s about XML and web services and really enhancing the Internet in terms of what it can do …. We really wanted to bring its name more in line with the rest of the platform pieces that make up the .NET framework.”

However the question still arises that what really is the ASP.NET?  You must know that as a member of the .net framework the ASP.NET is a very important tool in the hands of the programmers and the coders to build the dynamic pages and the web applications using the compiled languages like the VB and the C#. It really made the job of the programmer a lot easier than the classic ASP.

There are so many new things that had really made the ASP.NET the most favorite among the programmers who are busy in developing the website containing the dynamic pages.

I would now like to present some of the advantages of the ASP.NET which has really made it the strong favorite. They are as follows:

  1. How would you feel if any application can talk to the host of the other applications, running on the diverse technology and hardware? This is really possible with the ASP.NET. For example if you are connecting the real estate management system with the MLS system then how good it can be and how much time and mind will this save for us.
  2. It works on a single platform for the partner as well as the customer.
  3. The employees can always look up at the updated information on the desktop application, internet browser as well as the mobile browsers.
  4. The speed of the development is really optimal. It is really impossible to work faster than this at present.
  5. The ability of cross platform migration is also a key factor.
  6. High reliability.
  7. One more factor which you will really find advantageous is that you can work on multiple platforms. For example you can work on the visual basic or you can work on the C#.

These are really some of the advantages which have really brought the Top. I really feel that the ASP.NET will definitely remain in limelight for a longer period of time then the other software from the Microsoft.

Tips to Install Asp.net

Asp.net comes with the visual studio 2008 package. Hence if you want to work on the ASP.net then you will have to install the visual studio 2008. However the Asp.net is also available with the visual studio 2005 but it would be better if you use the latest version.

If you have previously installed the Microsoft visual studio version then you will have to make sure that you properly uninstall all the previous versions before installing the latest and that is the visual studio 2008.

I would like to present some points which you will have to keep in mind while installing the Microsoft visual studio 2008. They are as follows:

1. Uninstall the previous version as well as shut down all the running program
I really feel that before you start installing the latest version you should really uninstall the previous versions of the visual studio. You should also shut down the running programs for example Microsoft office application, internet explorer, windows explorer, and in fact everything which is open.

2. There are more links for visual studio 2008 and hence choose wisely
I do feel that you might face problems during the installation process. I do feel that on many cases you will be able to download about 90% of the software and then the downloading will stop. This is really pity since you are downloading 4GB software which is really huge. I do feel it would be better to buy a CD if you are not using a high speed internet.

3. You should install only those which you will be using
This is really very important. If you will download all the tools then it is quiet sure that your computer will run slowly and in fact it is the wastage of time. I firmly believe that you should install only those tools which you want to use. For example you can skip some language tools which you do not want to use.

4. Postpone all the early reboots
I must say that you will receive the reboot option on many occasions. However it is really better if you will postpone all such reboot option till the last. This will really be better for you.

5. If you install the team system, install the team system 2008 team explorer
When you install the visual studio team system then you might make the assumptions that your visual studio installation will be able to talk to the team foundation server. However this information is though logical but is not really correct.

6. Breaking changes to the ASP.net list view
If you have written any code in the previous version of the ASP.net then you will definitely have to upgrade your markup.

Apart from this the computer will regularly hint you what you have to do. You will just be required to hit on the next and you will have the software installed on your computer.