Saturday, 7 January 2017

Addition program in AngularJS with ASP.NET

<%@ Page Language="C#" AutoEventWireup="true" CodeFile="Addition1.aspx.cs" Inherits="Addition1" %>

<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
     <script src="https://ajax.googleapis.com/ajax/libs/angularjs/1.2.5/angular.min.js"></script>
</head>
<body>
    <form id="form1" runat="server">
    <div ng-app="">
        <h2>Addition program:</h2>
        <p>Enter first number:
        <asp:TextBox ID="txtFirstName" runat="server" ng-model="a" type="number"></asp:TextBox>
            </p>
   
         <p>Enter second number:
        <asp:TextBox ID="txtSecondNumber" runat="server" ng-model="b" type="number"></asp:TextBox>
            </p>

        <p>
            <h2>Output:</h2>
            <h3>{{a-b}}</h3>
        </p>
    </div>
    </form>
</body>
</html>

No comments:

Post a Comment