0

here I am using the test1.html file to send the data to test2.aspx page is an asp page but is not working at all test2.aspx page is sending result 0 of two numbers I want to why this is not working what`s the problem here?

<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8" />
    <title></title>
</head>
<body>
    <form action="test2.aspx" method="post">
        Enter The First Number1:<input type="number" name="num1" />
        Enter The First Number2:<input type="number" name="num2" />
        <br />
        <input type="submit" title="click" />

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

test2.aspx

<%@ Page Language="C#" AutoEventWireup="true" %>
<!DOCTYPE html>

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title></title>
</head>
<body style="height: 261px">
  
        <%
            string no1 = Request.Form["num1"];
            string no2 = Request.Form["num2"];

            int a= Convert.ToInt32(no1);
            int b= Convert.ToInt32(no2);
            int c = a + b;
            Response.Write(c);
            %>
    
</body>
</html>

0 Answers0