Ver Mensaje Individual
  #1 (permalink)  
Antiguo 24/06/2010, 07:52
dikcc
 
Fecha de Ingreso: junio-2010
Mensajes: 134
Antigüedad: 13 años, 10 meses
Puntos: 0
DropDownList Infernal

Muy buenas a todos.
A ver si me explico bien y podeis ayudarme...

<%foreach (TieProducts t in TableTieProducts.GetAll(0, 20))
{
if ((t.Units > t.UniMin) && (t.ProductType == 2))
{
string aaaa = t.Name;
string bbbb = t.Description;
TieProducts tP = new TieProducts();
tP = TableTieProducts.GetById(Convert.ToUInt32(t.Id));

System.Data.DataTable dt = new System.Data.DataTable();
dt.Columns.Add("CantidadTexto");
dt.Columns.Add("CantidadDato");
if (tP.UniMax > tP.Units)
tP.UniMax = tP.Units;
for (int i = 0; i < Convert.ToInt32(tP.UniMax); i++)
{
System.Data.DataRow r = dt.NewRow();
r["CantidadTexto"] = (i + 1).ToString();
r["CantidadDato"] = i + 1;
dt.Rows.Add(r);
}
Session["Aux"] = t.Id;
%>
<table>
<tr>
<td>
<asp:RadioButton runat="server" ID="rb1" Text='<%= aaaa%>' />
<br />
<asp:Label runat="server" Text='<%= bbbb%>'></asp:Label>
</td>
</tr>
<tr>
<td>
<asp:Label runat="server" Text="¿Cuantos productos quieres?"></asp:Label>
<asp:DropDownList runat="server" DataSourceID="cogerCombo" DataValueField="CantidadDato" DataTextField="CantidadTexto" Enabled="true"></asp:DropDownList>
</td>
</tr>
</table>
<% }
} %>
<br />
<br />

<table width="100%">
<tr align="center" valign="middle">
<td align="right" valign="middle">
<a id="A1" runat="server" href="confirmacion.aspx" onclick="AlmacenarLectores();"><asp:Label ID="Label1" runat="server" Text="Confirmar Pedido >>"></asp:Label></a>
</td>
</tr>
</table>

<asp:ObjectDataSource runat="server" ID="cogerCombo" TypeName="Compra_Default" SelectMethod="rellenarComboBoxMaxMin">
</asp:ObjectDataSource>

El método rellenarComboBoxMaxMin devuelve un DataTable y se encuentra en el fichero CS de este fichero ASPX en la clase de nombre Compra_Default

Me encantaría que me dijerais a bote pronto que creeis que falla en este código y luego os sigo contando, ya que me da varios errores.