Home » ASP.NET Basics
7

Writing code and handling events

We have so far developed our site without writing much code. In the last chapter, we have seen that some code is needed for handling various controls on our page. In this chapter, we are going to learn more about coding.

In This Chapter:

Why we need code?
Functions of coding
VB.NET or C#?
Comparison of Visual Basic and C#
The Code-behind model
Discussing the different models of writing code
Learning the C# Language
Overview of C#
Data Types and Variables
Defining function and uses of basic data types and variables
Constants
Defining function and uses of constants
Operators and Expressions
Defining function and uses of operators and expressions
Increment and Decrement operators
Defining function and uses of operators and expressions
Decisions
Concepts of decisions
The if-else statement
Defining function and uses of the if-else statement
The switch-case statement
Defining function and uses of the switch case statement
Loops
Defining function and uses of loops
Arrays
Defining function and uses of arrays
What are Events?
Defining function and uses of events
How do we use Events?
Steps to use events