Hallo,
ich habe folgende Funktion an das repeater onitemcommand geh�ngt.
inerhalb des Repeaters ist eine DropDownList definiert �ber die ich die
Quantity der einzukaufenden Produkte steuere, doch als Quantity wird immer
nur '0' angezeigt... irgendwie bekomme ich bei dem Versuch mir die
ausgew�hlte Menge aus der DropDownList zu selektieren keinen Wert...
hab mal mit folgender SChleife getestet ob �berhaupt was r�ber kommt aber
das funzt...
foreach(string param in Request.Form) {
        Response.Write(param + "=" + Request.Form[param].ToString() + "<br>"); 
}

weiss leider nicht mehr weiter an was kann das liegen...
bin f�r alle Anregungen dankbar.

Gruss Hans


  #region AddItemToCart_Command
  protected void AddItemToCart_Command(Object Sender,   RepeaterCommandEventArgs e)  {

   if (Session["ShoppingCart"] == null){
    dtCart = new DataTable("shoppingCart");
    dtCart.Columns.Add(new DataColumn("itemID", typeof(Int32)));
    dtCart.Columns.Add(new DataColumn("itemGuid", typeof(String)));
    dtCart.Columns.Add(new DataColumn("itemQuantity",typeof(Int32)));
    // die ID Spalte als AutoIncrement setzten...
    dtCart.Columns["itemID"].AutoIncrement = true;
    Session["ShoppingCart"] = dtCart;
   }

        int itemIndex =(int)e.Item.ItemIndex;  
        DropDownList myDropDownList 
=(DropDownList)RHitlist.Items[itemIndex].FindControl("pieces");
        Label myGuidLabel =(Label)RHitlist.Items[itemIndex].FindControl("productGuid");

        int quantity = Int32.Parse(myDropDownList.SelectedItem.Value);
        string productGuid = myGuidLabel.Text;

        Response.Write("Es wurde Zeile:"+ itemIndex +" angeklickt - 
"+productGuid+"--"+myDropDownList.SelectedItem.Value);

        dtCart = (DataTable)Session["ShoppingCart"];
        DataRow dr = dtCart.NewRow();
        dr[1] = productGuid;
        dr[2] = quantity;
        dtCart.Rows.Add(dr);
        Session["ShoppingCart"] = dtCart;
  }
  #endregion

___________________________________
Hans Pickelmann   

_______________________________________________
Asp.net Mailingliste, Postings senden an:
[EMAIL PROTECTED]
An-/Abmeldung und Suchfunktion unter:
http://www.glengamoi.com/mailman/listinfo/asp.net

Antwort per Email an