⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ch06-02-05.aspx

📁 这是一个asp.net的全文教程.里面还有数据库的数据.对初学者有很大的帮助
💻 ASPX
字号:
<%@ Page Language="VB" Debug = "True"%>
<Html>
<Head>
<Title>Ch06-02-05.aspx 调用程序的方法</Title>
<Script Language="VB" Runat = "Server">
	' 被调用的FunctionA程序
	Function FunctionA(ByVal VarA As String) As String
		Response.Write("程序名称:FunctionA()<BR>")
		Response.Write("输入的数据为:<B>" & VarA & "</B>")
	End Function
	' 具有输出值的FunctionB程序
	Function FunctionB(ByVal VarA As Integer) As Integer
		Dim I as Integer
		For I = 1 to VarA
			FunctionB += I
		Next
	End Function
</Script>
</Head>
<Body>
<%
Dim strA As String, intA As Integer , intB As Integer = 10
strA = "直接调用FunctionB程序!"
' 直接调用Function函数
Response.Write(FunctionA(strA) & "<P>")
' 成为表达式的一部分
intA = FunctionB(intB) * 10
Response.Write("FunctionB()程序是一个 1 加到 N 的程序,<BR>")
Response.Write("调用FunctionB()程序获取输出值并 * 10 的结果:" & intA)
%>
</Body>
</Html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -