Create a function (VB) : function « Language Basics « ASP.NET Tutorial






<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN"
    "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd"> 
<html>
  <head>
    <title>ASP.NET Functions</title>
    <script runat="server" language="VB">

      Function getName() As String
        Return "a"
      End Function

      Sub Page_Load(s As Object, e As EventArgs) 
        messageLabel.Text = getName()
      End Sub
    </script>
  </head>
  <body>
    <form runat="server">
      <asp:Label id="messageLabel" runat="server" />
    </form>
  </body>
</html>








2.4.function
2.4.1.Define and call function in asp.net page (C#)
2.4.2.Return value from function (VB)
2.4.3.Define function
2.4.4.Create a function (VB)