ASP.NET - ASP.NET MVC 4 RAZOR

 
Vista:
sin imagen de perfil

ASP.NET MVC 4 RAZOR

Publicado por Cristian (5 intervenciones) el 22/12/2013 00:42:24
Amigos, necesito de su ayuda....tengo un formularios en asp.net mvc RAZOR y lo tengo de esta manera:

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
@using (Html.BeginForm()) {
   // @Html.ValidationSummary("No fue posible crear la Persona") esto es para mostrar el mensaje arriba en general.
    <fieldset>
        <legend>Registration Form</legend>
        <ol>
            <li>
                @Html.LabelFor(m => m.Nombre)
                @Html.TextBoxFor(m => m.Nombre)
                 @Html.ValidationMessageFor(m => m.Nombre)
            </li>
            <li>
                @Html.LabelFor(m => m.Apellidos)
                @Html.TextBoxFor(m => m.Apellidos)
                 @Html.ValidationMessageFor(m => m.Apellidos)
            </li>
            <li>
                @Html.LabelFor(m => m.Edad)
                @Html.TextBoxFor(m => m.Edad)
                @Html.ValidationMessageFor(m => m.Edad)
            </li>
            <li>
                @Html.LabelFor(m => m.Comuna)
                @Html.TextBoxFor(m => m.Comuna)
                 @Html.ValidationMessageFor(m => m.Comuna)
            </li>
            <li>
            <label for="Mensaje"></label>
            </li>
        </ol>
        <input type="submit" value="Registrar" name="boton"/>
        <input type="submit" value="Volver" name="boton" />
        <input type="submit" value="Llenar" name="boton" />
        <input type="submit" value="limpiar" name="boton" />
    </fieldset>

La consulta es como puedo limpiar una caja de texto desde el codigo??... por ejemplo en asp.net webforms lo hago con txtNombre.Text = "";

Espero su respuesta, gracias.
Valora esta pregunta
Me gusta: Está pregunta es útil y esta claraNo me gusta: Está pregunta no esta clara o no es útil
0
Responder