C #. Net Study Notes (1)

Source: Internet
Author: User

Learning methods from ASP to ASP.net
The following are my experiences with. Net. I will gradually add my personal opinions and point out some mistakes to my friends.

In the beginning, I began to reject. Net. I felt very uncomfortable using it. I picked up. Net and looked at her from another angle.
I will post my learning experience, especially my ASP friends. I will introduce the differences between ASP and. Net.
I believe many of my friends who are playing ASP have tried to learn. Net. Why is it scared by?

In fact, it is best not to use VS in the beginning. For friends who have experience in ASP programming, learning. net, except for learning C #, it is more important to change the concept. If we use VS at the beginning, it is like using DW to write Asp (referring to the dynamic web page module integrated with DW) it often hides the truth and understands us. net working principle is very unfavorable.
Let's take a look at the code section first.
Copy codeThe Code is as follows:
<% @ Page Language = "C #" %>
<Html>
<Head>
<Link rel = "stylesheet" href = "intro.css">
</Head>
<Body>
<Center>
<Form action = "intro2_cs.aspx" method = "post">
<H3> Name: <input id = "Name" type = text>
Category: <select id = "Category" size = 1>
<Option> psychology </option>
<Option> business </option>
<Option> popular_comp </option>
</Select>
</H3>
<Input type = submit value = "Lookup">
<P>
<% For (int I = 0; I <8; I ++) {%>
<Font size = "<% = I %>"> Welcome to ASP. NET </font> <br>
<% }%>
</Form>
</Center>
</Body>
</Html>

Is it true that I was surprised when I knew that I could write it like this.
Why? Because the code and ASP code use the same structure as ASP except the C # syntax. More importantly, unlike ASP, the code used in the <%> block above is actually compiled using the script engine rather than explained. This improves the running performance.

Since it can be the same as Asp, why are there Server Web controls? Because Web controls facilitate the separation of html code and program code, it can be understood that an identifier is temporarily inserted in Html, which is controlled by. Net, so the code is very elegant.
The use of web controls makes the. Net and Asp code very difficult. By using controls, you can use more powerful controls to simplify programming. I personally think this is why Asp and. Net code are significantly different.

Next we should learn about C # in detail.
Use EditPlus to contact C # syntax.

After learning the basic syntax, I started to write Asp. Net
It is recommended to install the Quick Start in the SDK, which is a tutorial demonstration and very good.
Download Microsoft Visual Web Developer 2005 quick release
MSVWD is completely free of charge. You can download it from the official MS website. Of course, you need to install the MSDN quick version. Why are all quick versions?
Quick version is sufficient, but it is better to use MSVWD to write asp.net than vs2005. It is faster to start. When writing JavaScript, an automatic prompt is provided to complete the function!

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.