2011-10-20 15 views
-4

識別子が必要であることがわかりました。識別子が必要です

コード:

[HttpPost] 
public ActionResult EditProduct(int id, FormCollection collection) 
{ 
    ProductRepository repo = new ProductRepository(); 
    var product = repo.GetProductID(id); 

    string Pid = collection["Pid"]; 
    string name = collection["PName"]; 
    string type = collection["PType"]; 
    string deal = collection.["PDeal"]; 
    string desc = collection.["PDescription"]; 
    string price = collection.["PPrice"]; 
    repo.Save(); 

    return View("index"); 
} 

答えて

7

あなたはこれらの三行で余分な.あります

string deal = collection.["PDeal"]; 
string desc = collection.["PDescription"]; 
string price = collection.["PPrice"]; 
+0

を感謝男笑!彼らに気付かなかった。長い一日でした:( – user892239

関連する問題