C # source and VB source are different

Source: Internet
Author: User
Tags integer
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.







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.