Convert selected date from asp:Calendar to long string (VB.net) : Type Convert « Language Basics « ASP.Net






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

1.Convert string to double (VB.net)
2.Convert int value to string (VB.net)
3.Convert value in asp:TextBox to int in try catch block (VB.net)
4.Convert value in asp:TextBox to date in try catch block (VB.net)
5.Convert value in asp:TextBox to bool in try catch block (VB.net)
6.Convert value from asp:TextBox to int and compare (VB.net)
7.Convert Now (current date) to string (C#)
8.Output ASCII Code (C#)
9.Convert String to int and decimal (C#)
10.Convert double and date to string (C#)
11.Int, String and date variables (C#)
12.Read string from asp textbox and format it to DateTime (C#)
13.Convert int to String (C#)
14.Convert date to string (C#)