ASP.NET - pasar una variable por get

 
Vista:

pasar una variable por get

Publicado por Martin (3 intervenciones) el 21/01/2009 07:52:51
Hola, tengo el siguiente codigo de una pagina aspx
---------------------------------------------------------------------------------------------------------------------
<asp:Repeater ID="rptProducts" runat="server" OnItemCommand="rptProducts_ItemCommand">

<ItemTemplate>

<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10" valign="top"><img src="App_Theme/images/blue_left.png" alt="" width="10" height="123" /></td>
<td class="blue_bg">
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td width="10"> </td>
<td valign="bottom"><table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td>
<table width="100%" border="0" cellspacing="0" cellpadding="0">
<tr>
<td height="36" align="center"><b><%# DataBinder.Eval(Container.DataItem, "Name") %></b></td>
<%--<td height="36" align="center"><p><%# DataBinder.Eval(Container.DataItem, "Description") %></p></td>--%>
<td height="36" align="center">Price: <%# DataBinder.Eval(Container.DataItem, "Price") %></td>
<td width="30%" align="center"><%--<label>
<input name="VIN" type="text" size="3" />--%>
Qty ::<asp:TextBox ID="VI" runat="server" Width="30px" ></asp:TextBox>
<%--</label>--%></td>
</tr>
</table>
</td>
</tr>
<tr>
<td height="60">uration, invert, curves, and color fill. When you select Bevel, Blur, Emboss, Glow, Shadow, or Sharpen filters, either </td>
</tr>
</table></td>
<td width="50"> </td>
<td width="200" align="left"><a href="CheckOut.aspx?ProductId=<%# DataBinder.Eval(Container.DataItem, "Product_Id") %>"> <img src="App_Theme/images/buy_small.png" alt="" width="97" height="123" style="border:0px;"/></a></td>
</tr>
</table>
</td>
<td width="10" valign="top"><img src="App_Theme/images/blue_right.png" alt="" width="10" height="123" /></td>
</tr>
</table>


</ItemTemplate>
<%-- <SeparatorTemplate>
<tr><td colspan="2"><hr /></td></tr>
</SeparatorTemplate>--%>
</asp:Repeater>
-------------------------------------------------------------------------------------------------------------------------
lo que quiero hacer es pasar por get, el valor del asp:textbox, que representa una cantidad, como veran hay una seccion de codigo asi <a href="CheckOut.aspx?ProductId=<%# DataBinder.Eval(Container.DataItem, "Product_Id") %> a esta parte me gustaria agregarle el contenido que tenga el asp textbox para recibirlo en la pagina checkout.aspx
Espero que se entienda lo que quiero hacer, muchas 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

RE:pasar una variable por get

Publicado por Pablo Iñareta (131 intervenciones) el 23/01/2009 09:55:22
añade la cadena document.getElementById("idDelTextBox").value.
yo lo haria en el code behind y añadiria la cadena completa como un atributo del objeto <a>. en el momento de pintarlo, es mas crearia todo el elemento en el codebehind
Valora esta respuesta
Me gusta: Está respuesta es útil y esta claraNo me gusta: Está respuesta no esta clara o no es útil
0
Comentar