ASP.Net/Data Binding/DataBind Method

Материал из .Net Framework эксперт
Перейти к: навигация, поиск

DataBind() function

   <source lang="csharp">

<%@ Page Language="vb" %> <html>

  <head>
     <title>DataBind method example</title>
     <script runat="server">
        Dim Color As System.Drawing.Color = System.Drawing.Color.Red
        Sub Page_Load()
           Message.Text = "ForeColor is: " & Color.Name
           DataBind()
        End Sub
     </script>
  </head>

<body>

  <asp:label id="Message" ForeColor="<%# Color %>" runat="server"/>

</body> </html>

      </source>