Mega Code Archive

 
Categories / ASP.Net / Asp Control
 

Do a simple calculation and set value to asp

<script language="vb" runat="server">  Sub Page_Load()   Dim intEarn As Integer    Dim intTax As Integer   Dim decTotal As Decimal   intEarn = 150   intTax = 23    decTotal = intEarn - ((intEarn/100)*intTax)   Display1.Text = decTotal  End Sub </script> <html> <head>   <title>Declaring Variables</title> </head> <body>   Your total earnings after tax are $   <asp:label id="Display1" runat="server" /> </body> </html>