I am trying to connect 3 code files through MVC that are in 3 different folders (view, model and controller) and the code that is in view connects me with the controller, but the controller does not connect me with the of the model ... I tried everything but it works for me.
I leave the codes:
the view: (name: class1.asp)
<%@LANGUAGE="VBSCRIPT" CODEPAGE="1252"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=iso-8859-1" />
<title>Documento sin título</title>
</head>
<body>
<form id="form1" name="form1" method="post" action="../controlador/subclase1.asp">
<table width="252" border="1">
<tr>
<td width="89">Numero 1 </td>
<td width="147"><label>
<input type="text" name="num1" />
</label></td>
</tr>
<tr>
<td>Numero 2 </td>
<td><label>
<input type="text" name="num2" />
</label></td>
</tr>
<tr>
<td> </td>
<td><label>
<input type="submit" name="Submit" value="Enviar" />
</label></td>
</tr>
</table>
</form>
</body>
</html>
the controller's: (name: subclass1.asp)
<!-- #include file="../modelo/recibirclase1.asp" -->
<%
num1=cINt(request.Form("num1"))
num2=cINt(request.Form("num2"))
set objeto = new ejemplo
objeto.suma num1, num2
response.Write(objeto.devolver)
%>
the model: (recibcse1.asp)
<%
class ejemplo
public resultado
public function suma(num1, num2)
resultado=num1+num2
end function
public function devolver()
devolver=resultado
end function
end class
%>