Pages

Wednesday, May 19, 2010

Tutorial 1 - asp.net, c#.net

In this series of tutorials, you are going to learn how to make websites in asp.net with c#.net
We intend to explain examples here. The concepts are covered with the examples. It is expected that you will do some R&D on those examples.

Start visual studio. Click File -> New -> website. You will get window like this.



Note those 2 highlighted fields.

We will be working on simple ‘ASP.NET website’. Once you click ok, it visual studio will create a folder for you with two files. One file will have extension as ‘.aspx’, while other will have ‘.aspx.cs’.
Every webpage you create will have these 2 files.

.aspx – this is the file which will be displayed on the screen whenever one accesses the webpage/website you have developed. It is GUI oriented, meaning, it has HTML code (and some pure ASP code), according to which the site will be displayed on the screen.
.aspx.cs – it’s where you put your logic. E.g. if you want to show something right on ‘page load’, you can write it under ‘page_load’ function. All the logical/algorithmic part of the program is written in this file.

If we want to put some controls on webpage (like textbox, button, label etc. ), we do that on this .aspx page. And the manipulation of these controls is done on .aspx.cs page.

In all the subsequent tutorials, always pay heed to both the files.

No comments:

Post a Comment