Ten Days Society ASP.NET's first day
I think ASP.NET is much more difficult than ASP, I hope everyone will prepare. It is difficult to make a lot of ways to achieve the same effect, and everyone may be confused. Ten Days Society Series The tutorial will clearly write a variety of methods, so that everyone can be less bumpy. In the ASP, everyone is almost all using VB, database, nor SQL and
Access. In ASP.NET, the database is still the two but common languages, and it is also a language recommended by Microsoft, which is customized for .NET platform. In this way, ASP.NET has four combinations: VB Access, VB SQL, C # Access, C # SQL, this tutorial will use C # Access, and take into account four kinds of words, let everyone have ASP.NET A comprehensive understanding. Although I don't need any ASP foundation, I think if everyone is will not, still look at [Ten Days Society ASP Tutorial], everyone needs to know how to write, but how to build
Server, how to use the HTML form, and there is a foundation and understanding of the SQL statement, because I will not put some foundations in this article.
Not much nonsense, start our first day of learning:
Learning purpose: debugging the installation environment
I want to declare that the operating system uses 2000. If you want to learn a network language, you should not be able to install an operating system, then I don't want to learn.
Download one online first
MDAC (if you have a version of 2.7 or more), then install it, you may be restarted once later.
Then download one .NET F
Ramework SDK, there will be two things in the management tool inside the control panel in the installation. This is not to pay attention to him, and we are going to use or the original Internet service manager. Open it Follow the debugging method in the ASP tutorial to create a directory, create an Example1.aspx, then open this file with Notepad Inside
Void Page_Load ()
{
Response.write ("Hello World!");
}
Script>
-------------------------------------------------- ------------------------------
SUB Page_Load ()
Response.write ("Hello World!")
End Sub
Script>
Then use local access to view the results:
Here I want to explain two points: 1, my sample file always has a and b, named C # and VB, the picture of the presentation with C #, all the same, the tutorial inside the code is also written two Use
Ten Days Society ASP.NET
The purpose of this day is to master the basic knowledge of C #
First, define variables:
String strexample; string ("aaa")
Char Chrexample; Character ('a') Bool Blnexample; BOOL / FALSE
Dataime Datexample; Date type ("09/19/2002")
INT INTEXAMPLE; integer (32-bit symbol integers)
Double dblexample; floating point number (64-bit double
Accuracy floating point number)
Second, various operations:
= Assignment operation
Addition operation
- subtraction operation
* Multiplication
/ Division operation
% Modeling operation
&& logical and
Logic or
! Logic Not
Third, various
structure:
IF (condition)
{
}
Else
{
}
Switch (condition)
{
Case Option1:
Break;
Case Option2:
Break;
}
For (int i = 1; i <= 10; i ) // Special attention this is a semicolon
{
}
WHILE (condition)
{
}
DO
{
WHILE (condition);
Fourth, pay attention to:
1. People who use habits VB can easily miss the semicolons at the end of the statement;
2, people who use habits VB are very casual but do not declare, which is not allowed by default in C #;
3. When passing the parameters to the function, use parentheses: Response.write "aa"; it is not allowed.
I have almost said that I am not talking about a language. A language is not just learning syntax, but also learning language characteristics. I hope everyone will have time to buy a C # book to study C # as a A new language characteristic. Today, I said here, talk about the web control tomorrow.
Ten Days Society ASP.NET on the third day
Maybe you will ask, why do I need a web control? The web handling seems to be in VB, which can be referenced anywhere in the program, modify all properties, with its cooperation to complete the code
Separate. Think about it, if it is still the previous HTML, we need to display a database in a place to display a database of <% =%> This is bound to include the program's code block, you can't reach the separation code. The purpose of the interface.
Maybe you will ask, why do you want to separate? The reason is very simple, not every programmer is a qualified web designer. If we need to modify the code, it will destroy the original settings of the web designer, is it inconvenient, the program code and the HTML code are mixed together for the program It is not convenient to modify the code. Of course, our web designers also need to learn a little knowledge of Web.
Let's take a presentation:
First, Label Control:
Main attributes:
Text tag text displayed
Example:
It should be noted that we cannot miss the word runt = "server", and all WEB controls must be included in