ASP.Net/Data Binding/Function
Define function with Date value type
<source lang="csharp">
<script language="vb" runat="server">
Sub Page_Load() Dim DueDate As Date Dim CheckOutDate As Date CheckoutDate = Now() DueDate = FindDueDate(CheckoutDate) Message1.text = "
Your books were checked OUT on "& CheckOutDate Message2.text = "
Your books are due on " & DueDate End Sub Function FindDueDate(CheckOutDate As Date) As Date return DateValue(DateAdd("d", 14, CheckOutDate)) End Function
</script> <html> <head> <title>Sample Function Page</title> </head> <body>
Thank you for using the On-Line Library.
<asp:label id="message1" runat="server"/> <asp:label id="message2" runat="server"/>
</body> </html>
</source>