tengo una duda estoy trabajando en una aplicacion web con C# , el caso es que debo de procesar los datos de un formulario y mostrarlos en otro , uso "Request.Params" para ello ademas de configurar el boton del envio en el parametro de PostBackURL indicando donde tiene que ir este formulario , agrego la configuracion post en la etiqueta form y todo ok hasta el momento , pero ademas debo de generar un stylo general para este formulario para eso uso una Master.Page, el problema es que ya con esto no funciona el procesar del formulario , favor su ayuda para ello :(
les dejo el codigo de la Master.Page
Código:
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> <asp:ContentPlaceHolder ID="head" runat="server"> </asp:ContentPlaceHolder> <link runat="server" id="stylesheet3" href="~/Styles/gridStyle.css" type="text/css" rel="stylesheet" /> <link runat="server" id="stylesheet4" href="~/Styles/combobox.css" type="text/css" rel="stylesheet" /> <link runat="server" id="stylesheet5" href="~/Styles/General.css" rel="stylesheet" /> <link runat="server" id="stylesheet6" href="~/Styles/treeStyle.css" type="text/css" rel="stylesheet" /> <link runat="server" id="stylesheet7" href="~/Styles/ToolBarStyle.css" type="text/css" rel="stylesheet" /> <style type="text/css"> .style1 { } .style2 { width: 28px; } .style3 { width: 123px; } .style4 { width: 918px; } .style5 { height: 23px; } </style> </head> <body> <form id="form1" runat="server" method="post"> </form> </body> </html>
el codigo del formulario
Código:
<asp:Content ID="Content2" ContentPlaceHolderID="ContentPlaceHolder1" runat="server"> <div> <table> <tr> <td style="width: 100px; height: 21px;"> <asp:ImageButton ID="img_GuardarMantUsuario" OnClick="Img_Guardar_Click" runat="server" Width="16px" ImageUrl="~/Images/floppy.jpg" Height="16px" ToolTip="Guardar" ValidationGroup="Ingresa_usuario" TabIndex="9" PostBackUrl="~/R_Man_Ins_Usuario.aspx"></asp:ImageButton> <asp:ImageButton ID="img_VolverMantUsuario" runat="server" ToolTip="Volver" ImageUrl="~/Images/bot_retroceder_on.gif" CausesValidation="False" Width="17px" Height="17px" TabIndex="10" /> </td> </tr> </table> </div> <div> <table> <tr> <td> <asp:Label ID="lbl_RutMantUsuario" runat="server" Text="Rut" CssClass="cssTextoNormal"></asp:Label> </td> <td style="width: 922px; height: 26px;" align="left" > <asp:TextBox ID="txtRutMantUsuario" runat="server" MaxLength="8" TabIndex="1"></asp:TextBox> <asp:RequiredFieldValidator ID="RequiredFieldValidator4" runat="server" ControlToValidate="txtRutMantUsuario" Font-Size="Small" ValidationGroup="Ingresa_usuario" ForeColor="Red">*</asp:RequiredFieldValidator> <asp:Label id="Label6" runat="server" CssClass="cssTextoNormal" Text="Ej:14222333 Rut sin guion, digito y puntos." ToolTip="Sin puntos, guion y digito verificador"></asp:Label> <asp:RangeValidator ID="RV_rut" runat="server" ControlToValidate="txtRutMantUsuario" ErrorMessage="Ingrese solo números" Font-Size="X-Small" MaximumValue="99999999" MinimumValue="1" Type="Integer" ValidationGroup="Ingresa_usuario" CultureInvariantValues="True" CssClass="cssErrorNormal"></asp:RangeValidator> </td> <td style="width:120px; height: 26px;"> </td> </tr> </table> </div> </asp:Content>
y la pagina que muestra datos
Código:
<html xmlns="http://www.w3.org/1999/xhtml"> <head runat="server"> <title></title> </head> <body> <form id="form2" runat="server"> <div> <table> <tr> <td class="style8"> <asp:Label ID="Label1" runat="server" CssClass="cssTextoNormal" Text="Datos del Usuario"></asp:Label> </td> <td style="width: 922px"> </td> <td> </td> </tr> <tr> <td class="style8"> </td> <td style="width: 922px"> </td> <td> </td> </tr> <tr> <td class="style10"> <asp:Label ID="lbl_RutMantUsuario" runat="server" Text="Rut" CssClass="cssTextoNormal"></asp:Label> </td> <td class="style10"> <asp:Label ID="lbl_RutMantUsuarioR" runat="server" CssClass="cssTextoNormal"></asp:Label> </td> <td class="style11"> </td> </tr> </table> </div> </form> </body> </html>
y el codigo C# de esta
Código:
using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace OTA_OT { public partial class R_Man_Ins_Usuario : System.Web.UI.Page { protected void Page_Load(object sender, EventArgs e) { lbl_RutMantUsuarioR.Text = Request.Params["txtRutMantUsuario"]; } } }