Bind BulletList to calendar selected value (C#) : BulletList « Data Binding « ASP.Net






Bind BulletList to calendar selected value (C#)

<%@ Page Language="C#" %>

<script runat="server">

    protected void btnSubmit_Click(object sender, EventArgs e)
    {
        bltResults.DataSource = Calendar1.SelectedDates;
        bltResults.DataBind();
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Calendar SelectionMode</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    <asp:Calendar
        id="Calendar1"
        SelectionMode="DayWeekMonth"
        runat="server" />
    
    <br /><br />
    
    <asp:Button
        id="btnSubmit"
        Text="Submit"
        OnClick="btnSubmit_Click" 
        Runat="server" />
        
    <hr />
    
    <asp:BulletedList
        id="bltResults"
        DataTextFormatString="{0:d}"
        Runat="server" />
        
    </div>
    </form>
</body>
</html>
           
       








Related examples in the same category

1.Bind List data to asp bulletlist (Vb.net)
2.Bind list to asp BulletedList (C#)
3.Sort asp BulletList (C#)
4.Bind BulletedList to Sql data source (C#)