I have a small problem I am trying to select a row in a gridview that I have in my view and that data in the row pass them to a form that is in the same view I am working with MVC 2 (aspx) therefore I have tried the ways of doing it from code-behind and they do not work for me because it does not enter this one since in the code behind I have this line System.Web.Mvc.ViewPage
and I want to pass it directly without a controller, because when I press record in my textbox, at that moment it enters the controller but I do not know how. here is the code aspx
<div class="row">
<h2 style="font-size: 20px;">Administrar usuario</h2>
<%using (Html.BeginForm("Insert", "Perfiles"))
{%>
<div class="col-xs-3">
<td class="auto-style5">Usuario:<br />
<asp:TextBox ID="txtUsuario" runat="server" Width="160px" />
</td>
<td class="auto-style4">
<br />
<br />
Nombre:<br />
<asp:TextBox ID="txtNombre" runat="server" Width="160px" />
<br />
</td>
<td class="auto-style3">
<br />
Correo:<br />
<asp:TextBox ID="txtCorreo" runat="server" Width="160px" />
</td>
<td class="auto-style1">
<br />
<br />
Estado:<br />
<asp:DropDownList ID="DropDownList1" runat="server" Width="160px">
<asp:ListItem Value="1">Activo</asp:ListItem>
<asp:ListItem Value="0">Inactivo</asp:ListItem>
</asp:DropDownList>
<br />
<br />
Tipo de perfil:<br />
<asp:DropDownList ID="DropDownList2" runat="server" Width="160px">
<asp:ListItem Value="1">Administrador</asp:ListItem>
<asp:ListItem Value="2">Usuario</asp:ListItem>
</asp:DropDownList>
<div class="col-xs-12">
<input type="submit" value="Grabar" class="btn btn-secondary" style="margin-top: 30px; margin-right: 18px; margin-left: 47;">
</div>
<%}%>
</div>
<div class="col-xs-9">
<asp:GridView ID="GridView1" runat="server" class="table table-bordered" AutoGenerateColumns="False" DataSourceID="SqlEdit" Height="139px" Width="745px">
<Columns>
<asp:BoundField DataField="descripcion_perfil" HeaderText="Descripción perfil" SortExpression="descripcion_perfil" />
<asp:BoundField DataField="cuenta_usuario" HeaderText="Cuenta usuario" SortExpression="cuenta_usuario" />
<asp:BoundField DataField="nombre_usuario" HeaderText="Nombre" SortExpression="nombre_usuario" />
<asp:BoundField DataField="Correo_usuario" HeaderText="Correo" SortExpression="Correo_usuario" />
<asp:BoundField DataField="Descripcion_estado" HeaderText="Estado" SortExpression="Descripcion_estado" />
</Columns>
<HeaderStyle BackColor="#0066FF" ForeColor="White" />
</asp:GridView>
<asp:SqlDataSource ID="SqlEdit" runat="server" ConnectionString="<%$ ConnectionStrings:con %>" SelectCommand="SELECT tb_perfil.descripcion_perfil, tb_usuario.cuenta_usuario, tb_usuario.nombre_usuario, tb_usuario.Correo_usuario, tb_estado.Descripcion_estado FROM tb_estado INNER JOIN tb_perfil_usuario INNER JOIN tb_perfil ON tb_perfil_usuario.codigo_perfil = tb_perfil.codigo_perfil INNER JOIN tb_usuario ON tb_perfil_usuario.Codigo_usuario = tb_usuario.Id_usuario ON tb_estado.Codigo_estado = tb_usuario.Codigo_estado"></asp:SqlDataSource>
</div>
</div>
</div>