.net中函数Function的用法
2005-03-16 12:58
471 查看
<%@ Page Language="c#" %>
<script runat="server">
void Page_Load()
{
DateTime DueDate;
DateTime CheckOutDate;
CheckOutDate = DateTime.Now;
DueDate = FindDueDate(CheckOutDate);
message1.Text = "<br>Your books were checked OUT on " + CheckOutDate;
message2.Text = "<br>Your books are due on " + DueDate.ToString("d");
}
DateTime FindDueDate(DateTime CheckOutDate)
{
return CheckOutDate + TimeSpan.FromDays(14);
}
</script>
<html>
<head>
<title>Sample Function Page</title>
</head>
<body>
<h2>Thank you for using the On-Line Library.
</h2>
<asp:Label id="message1" runat="server"></asp:Label><asp:Label id="message2" runat="server"></asp:Label>
</body>
</html>
<script runat="server">
void Page_Load()
{
DateTime DueDate;
DateTime CheckOutDate;
CheckOutDate = DateTime.Now;
DueDate = FindDueDate(CheckOutDate);
message1.Text = "<br>Your books were checked OUT on " + CheckOutDate;
message2.Text = "<br>Your books are due on " + DueDate.ToString("d");
}
DateTime FindDueDate(DateTime CheckOutDate)
{
return CheckOutDate + TimeSpan.FromDays(14);
}
</script>
<html>
<head>
<title>Sample Function Page</title>
</head>
<body>
<h2>Thank you for using the On-Line Library.
</h2>
<asp:Label id="message1" runat="server"></asp:Label><asp:Label id="message2" runat="server"></asp:Label>
</body>
</html>
相关文章推荐
- MATLAB 函数句柄Function handle的用法(Af = @(x) A*x;)
- javascript中函数(function)的用法
- js 函数function用法
- [原创]如何在Delphi中调用.Net编写的DLL中的函数(Function)、过程(Procedure)
- 如何在Delphi中调用.Net编写的DLL中的函数(Function)、过程(Procedure)
- Javascript匿名函数自调用方法 (function(){})()用法
- Hive常用的SQL命令操作(hive shell下show functions显示所有可用的函数,describe function 函数名查看具体用法)
- oracle管道(pipelined function)函数用法
- 如何在Delphi中调用.Net编写的DLL中的函数(Function)、过程(Procedure)
- .net中函数的用法详解
- toggle的用法(点击更换不同的function)当指定元素被点击时,在两个或多个函数之间轮流切换。
- js 函数function用法
- MATLAB 函数句柄Function handle的用法(Af = @(x) A*x;)
- .NET 2.0 中 GetDelegateForFunctionPointer 函数实现原理浅析 [草稿]
- C++ - 函数表(function table) 和 函数(function)容器 的 用法
- [原创]如何在Delphi中调用.Net编写的DLL中的函数(Function)、过程(Procedure)
- C++ - 函数表(function table) 和 函数(function)容器 的 用法
- C++ - 函数表(function table) 和 函数(function)容器 的 用法
- js 函数function用法
- js 函数function用法