Convert selected date from asp:Calendar to long string (VB.net)
<%@ Page Language="VB" %>
<script runat="server">
Sub Button1_Click(sender As Object, e As EventArgs)
Label1.Text = Calendar1.SelectedDate.ToLongDateString()
End Sub
</script>
<html>
<head>
</head>
<body>
<form runat="server">
<p>
<asp:Calendar id="Calendar1" runat="server"></asp:Calendar>
</p>
<p>
<asp:Button id="Button1" onclick="Button1_Click" runat="server" Text="Button"></asp:Button>
</p>
<p>
<asp:Label id="Label1" runat="server">Label</asp:Label>
</p>
</form>
</body>
</html>
Related examples in the same category