Ver Mensaje Individual
  #1 (permalink)  
Antiguo 31/01/2011, 12:56
skel363
 
Fecha de Ingreso: febrero-2003
Ubicación: chile
Mensajes: 101
Antigüedad: 21 años, 2 meses
Puntos: 1
.NET pagina LOGIN MVC

Estimados(as):

Tengo un problema que agradeceria qe alguien me pudiese ayudar. Resulta que tengo mi pag de login de la siguinete forma (trabajando con MVC 2)

Código:
<table cellpadding="0" cellspacing="0" border="0" style="width:500px; height:300px">
                <tr>
                    <td>
                        <table cellpadding="2" cellspacing="0" border="0" style="width:100%">
                            <tr align="center">
                                <td colspan="2" style="width:100%">LMS</td>
                            </tr>
                            <tr align="center">
                                <td colspan="2" style="width:100%">(Learning Management System)<hr /></td>
                            </tr>
                            <tr>
                                <td style="width:20%">Usuario</td>
                                <td style="width:80%"><input name="txtUsuario" id="txtUsuario" type="text"/></td>
                            </tr>
                            <tr>
                                <td style="width:20%">Password</td>
                                <td style="width:80%"><%= Html.Password("txtPass")%></td>
                            </tr> 
                             <tr>
                                <td style="width:50%; text-align:left">
                                    <button id="btnRecordarPass">Recordar Contraseña</button>
                                </td>
                                <td style="width:50%; text-align: right">
                                   <% Html.BeginForm("Edit", "Login", FormMethod.Post); %>
                                        <input type="submit" name="btnSubmit" value="PROBAR" />
                                   <% Html.EndForm(); %>
                                </td>
                            </tr> 
                        </table>
                    </td>
                </tr>
            </table>
el controlador asi
Código:
 public class LoginController : Controller
    {
        //
        // GET: /Login/

        public ActionResult Index()
        {
            return View();
        }

         public ActionResult Edit(string btnSubmit)
        {
            ActionResult result = View();

            switch (btnSubmit)
            {
                case "Search":
                    result = View();
                    break;
                case "Save":
                    result = View();
                    break;
            }

            return result;
        }
}
y el web config
Código:
	<authentication mode="Forms">
		<forms timeout="2880" loginUrl="~/Login"></forms>
	</authentication>
	<authorization>
		<deny users="?"/>
	</authorization>
ahora mi problema es que al presionar el boton btnSubmit nunca desencadena el metodo EDIT del controlador, pero cuando comento las lineas del web.config para probar desencadena el método sin problemas.

Alguin sabe a que se debe esto.
__________________
s[K]eL