Page Culture (C#) : Culture « Page « ASP.Net






Page Culture (C#)

<%@ Page Language="C#" Culture="id-ID" UICulture="id-ID" %>

<script runat="server">

    void Page_Load()
    {
        lblDate.Text = DateTime.Now.ToString("D");
        lblPrice.Text = (512.33m).ToString("c");
    }
</script>
<html xmlns="http://www.w3.org/1999/xhtml" >
<head id="Head1" runat="server">
    <title>Bagus</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
    Today's date is:
    <br />
    <asp:Label
        id="lblDate"
        Runat="server" />
    
    <hr />
    The price of the product is:
    <br />
    <asp:Label
        id="lblPrice"
        Runat="server" />

    </div>
    </form>
</body>
</html>

           
       








Related examples in the same category

1.Set culture in the web.config
2.Get culture from binded ObjectDataSource (C#)
3.Culture: id-ID
4.Culture auto (C#)
5.Get Culture: de_DE, id-ID (C#)