Data binding expression : Binding expression « Data Binding « ASP.Net

Data binding expression

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Default.aspx.cs" Inherits="Default" Debug="true" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "">

<html xmlns="" >
<head runat="server">
    <title>Data-bound Expressions</title>
    <form id="form1" runat="server">
        <h2>Today is 
        <asp:Label ID="Today" runat="server" Text="<%# DateTime.Now %>" />

File: Default.aspx.cs

using System;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text;

public partial class Default : System.Web.UI.Page
    protected void Page_Load(object sender, EventArgs e)


Related examples in the same category

1.Binding to a Method