Tuesday, June 23, 2009

Sample ASP.NET Web App - Registration Form -2

Next Step:
Make sure you are comfortable with the SolutionExplorer window, Properties Window , Toolbox, and finally the center part the "work area" where we put in our code that builds our project.
You can see three tabs at the bottom of the "Work Area". Design view is for the design, Source view is for the code and Split view is to see the design and the source at the same time.

Next Step: As we are familiar with the interface lets do some coding.
By default you have some code that helps you run the application. lets do that first and make ourselves comfortable with the process.

Next Step: There are two ways to run our application
1. Running with Debugging (Debugging is a process of going through the code while we run the application, which is widely used in the later posts)
2. Running without Debugging
As we dont have any code that we want to see while we run the application so lets take the second option "Running without Debugging"
Hit F5 Key on your computer, it will open a window with the two options that we just discussed. select the second Option (Run without Debugging) and click on OK.

Next Step: This opens your browser (Default: Internet Explorer) and all you can see there is a blank page, the reason is that we didnt put any code to show it on our web page. So now we are familiar with what and how the interface looks and what happens when we run the application so lets start putting stuff on the webpage, to do that close the internet explorer that just opened and go to visual studio.

From now its not just text that we see on the blog, but there will be some code and some playing that we do with the controls (from the Toolbox) to have our registration form built and run on the web browser.

Goto the next post -- "Sample ASP.NET Web App - Registration From - 3"

Sample ASP.NET Web App - Registration Form

Hi Everyone,
Finally we are here to build our first .NET web application, we are going to build a web based registration form, that is done in a 3-tier Architecture.
Consider that you have all necessary softwares (Visual Studio 2005/2008/express, SQL Server 2005/2008/express) installed, with no delay lets start our project.

Step 1. Open Visual Studio (any version that you have installed) and goto
File\New\Project

Step 2. An open view dialog window is displayed with "Project Types" on the left where you given an option to select the type of project as a C# or VB or VC++ project etc.. and to the right you have the availble types of application you can do and down at the bottom you see the path where your project is stored and the Name of the Project.
Now select C#, to your left of that window and select "ASP.NET Web Application" to the right as we are going to create a website. Give any name (in this example i give it as ,'registrationWebApplication'. Before clicking on OK make sure you have the checkbox (Create Directory for Solution Option) to the right checked. we will talk about this later. Go ahead an click on OK.

Step 3. Now Visual Studio Creates a project folder with the name that you gave, in our case it will be 'registrationWebApplication' at
c:\\documents\\Projects\
and also gives you an interface where we can start building our application. This is how it looks:


Step4: This is where every .NET Developer lives most of their life, so better we know what we are looking at. I am not going to explain each and every thing in detail, but will explain the necessary parts for now and rest are explained on the go.
To your top-right is "Solution Explorer" where every webpage that we create, any refereces that we make to our website, any images that we add to our website, anything that you have for the project is seen. Solution Explorer is on of the main places that we visit and work on a lot in .NET.
To your bottom-right is "Properties Window" thats where we set the properties of any and every control that we use in our project like Textboxes, lables, buttons, checkboxes, radio buttons, each and every control's properties are given here. Trust me, we are going to use this a lot.
To the Left you have "Toolbox" where you see several tabs with lot of .NET controls and HTML controls. This is where we get our control for the website like textboxes, buttons, and hell lot of other control that are provided with .NET by default
and if you see to the left bottom next to the Toolbox you see another tab "Server Explorer" which is used for database connections , we will discuss this later. but for now lets not waste any time and jump into our project.

Continue reading next post..."Sample ASP.NET Web App - Registration From -2"

Saturday, June 20, 2009

.NET in 3-teir Architecture

Hey,
Before we get into the real coding in .NET, Let me give a basic idea of what a 3-teir Architecture is and how you can build your very powerful .NET applications on that basis.
Lets think of an example, where we have to enter our data in a registration form on the internet and you get an e-mail confirmation. The registration form where we enter our data on the web, the look we see and the feel we get is in the first layer also called front end and the data that is being stored when we submit the form is stored in the database layer also called the back end layer. Finally the logic behind the communication between the front and the backend layer is implemented in the middle tier, i call it as the logical layer.
To put the above 3 tier in the .NET (web application) words, it can be explained as follows, the front end (first tier) can be implemented in ASP.NET which is a drag and drop application, the back end (third tier) can be done using any database like SQL Server, Oracle, MS-Access, XML etc and the main tier(logical layer) can be done in either C# or VB.NET
so in real words...
front end --- ASP.NET
logical layer -- C# or VB.NET
back end --- SQL Server, Oracle, MS-Access, XML etc (databases)

Note: The above article is in my own words so, if there are any misspells or does have any mistakes, please ignore but the concept is crispy. The next article will be a basic web application with a registration form.

Wednesday, June 3, 2009

.NET-101 Post-1

Any application that you wanted to build can be done in so many ways, for example if you want to build a website you can do that in Java(JSP etc), .NET, PHP, HTML and so many other ways but the main point of selecting the right choice depends on various other important factors like expandability, reliability, consistency, ease, interface and fun etc., 
In my view .NET stands the best for all the above choices.
To Start programming on .NET you need to have the following depending on the OS you have

Windows Vista and XP
  • download .NET 3.5 Framework 
  • download Visual Studio 2008 Express Edition
  • download Microsoft SQL Server 2008 Express Edition
and install them, now you are almost set to start writing webpages or desktop applications using Visual Studio.

Welcome Post

Hello Everyone, 
If you are one of thousands out there who wants to get into .NET and don't know where to start and how to start this is the right place. Every single post that you will see here from now is made by keeping that in mind as I was a beginner like you once, and discovered an easy way to start and get to know .NET much better.
Most of my posts will be either with photos or videos, in order to make you feel more comfortable with the interface and the language
Let's start without any delay...

VJ-Malla