Convert double and date to string (C#)
<script Language="c#" runat="server"> void Page_Load() { string strEarn = "150"; string strTax = "23.0"; double dblEarn = Convert.ToInt32(strEarn); decimal decTax = Convert.ToDecimal(strTax); double dblTotal = dblEarn - ((dblEarn/100) * (double)decTax); Display1.Text = dblTotal.ToString(); DateTime datNow = DateTime.Now; Display2.Text = " " + datNow.ToString("d"); } </script> <html> <head> <title>Declaring Variables</title> </head> <body> <asp:label id="Display1" runat="server" /> <br /> <asp:label id="Display2" runat="server" /> </body> </html>