C # Source
Intro2_cs.aspx
1 <%@ Page language= "C #"%>
2
3<html>
4 <head>
5 <link rel= "stylesheet" href= "Intro.css" >
6 </head>
7
8 <body>
9
<center>
11
<form action= "intro2_cs.aspx" method= "POST" >
13
<h3> Name: <input id= "Name" type=text>
15
Category: <select id= "Category" size=1>
<option>psychology</option>
<option>business</option>
<option>popular_comp</option>
</select>
21
</h3>
23
<input type=submit value= "Lookup" >
25
<p>
27
<% for (int i=0 i <8; i++) {%>
<font size= "<%=i%>" > Welcome to asp.net </font> <br>
<%}%>
31
</form>
33
</center>
35
</body>
37</html>
38
VB Source
Intro2_vb.aspx
1 <%@ Page language= "VB"%>
2<html>
3 <head>
4 <link rel= "stylesheet" href= "Intro.css" >
5 </head>
6
7 <body>
8
9 <center>
10
<form action= "intro2_vb.aspx" method= "POST" >
12
<h3> Name: <input id= "Name" type=text>
14
Category: <select id= "Category" size=1>
<option>psychology</option>
<option>business</option>
<option>popular_comp</option>
</select>
20
</h3>
22
<input type=submit value= "Lookup" >
24
<p>
26
<% Dim I as Integer
for I = 0 to 7%>
<font size= "<%=I%>" > Welcome to asp.net </font> <br>
<% Next%>
31
</form>
33
</center>
35
</body>
37</html>
38
39
After learning the difference between the C # source intro2_cs.aspx and the VB source intro2_vb.aspx, it is difficult to find C # code. In particular, there is a big difference between the two loops,
C#
1<% for (int i=0 i <8; i++) {%>
2 <font size= "<%=i%>" > Welcome to asp.net </font> <br>
3 <%}%>
4
Vb
1 <% Dim I as Integer
2 for I = 0 to 7%>
3 <font size= "<%=I%>" > Welcome to asp.net </font> <br>
4 <% Next%>
5
VB is still very intuitive, has been learning VB so it feels good to understand. C # is like C language.