Math.Sqrt() method - get square root of a number in c#

Math.Sqrt() Method
Sqrt.aspx

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

<!DOCTYPE html>

<script runat="server">

    protected void Button1_Click(object sender, System.EventArgs e)
    {
       double myValue = 49;
       double myValueSqrt = Math.Sqrt(myValue);
       Label2.Text = "Sqrt of " + myValue + " is: " + myValueSqrt;
    }
</script>

<html xmlns="http://www.w3.org/1999/xhtml">
<head id="Head1" runat="server">
    <title>asp.net Math.Sqrt() example: How to get Sqrt of a value in asp.net</title>
</head> 
<body>
    <form id="form1" runat="server">
    <div>
        <h2 style="color:Maroon">asp.net Math example: Math.Sqrt()</h2>
        <asp:Label 
             ID="Label1" 
             runat="server" 
             Font-Size="Large"
             ForeColor="SeaGreen"
             Font-Bold="true"
             Font-Italic="true"
             Text="Value is: 49"
             >
        </asp:Label>
        <br />
        <asp:Label 
             ID="Label2" 
             runat="server" 
             Font-Size="Large"
             ForeColor="Crimson"
             Font-Bold="true"
             Font-Italic="true"
             >
        </asp:Label>
        <br /><br />
        <asp:Button 
             ID="Button1" 
             runat="server" 
             OnClick="Button1_Click"
             Font-Bold="true"
             Text="Get Sqrt(49)"
             ForeColor="SeaGreen"
             />   
    </div>
    </form>
</body>
</html>
More asp.net examples