• 博客园logo
  • 会员
  • 众包
  • 新闻
  • 博问
  • 闪存
  • 赞助商
  • HarmonyOS
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
洞庭熊猫
无兄弟不篮球,无团队不项目!
博客园    首页    新随笔    联系   管理    订阅  订阅
CS1501: No overload for method 'CreateProduct' takes '9' arguments 解决
此种错误非常容易理解,对于没有超载的方法“CreateProduct”有9个冲突

   此种错误非常容易理解,对于没有超载的方法“CreateProduct”有9个冲突。如

Line 65:     {
            Line 66:         string categoryId = Request.QueryString["CategoryID"];
            Line 67:         bool success = CatalogAccess.CreateProduct(categoryId,newName.Text,
newDescription.Text,newPrice.Text,newPrice.Text,newImage1FileName.Text,
newImage2FileName.Text,newOnDepartmentPromotion.Checked.ToString(),
newOnCatalogPromotion.Checked.ToString());
            Line 68:         statusLabel.Text = success ? "Insert successful" : "Insert failed";
            Line 69:         BindGrid();

很明显,我这里多了个newPrice.text,因为我在CatalogAccesss中的CeateProduct方法中只定义了8个参数,而这里有9个就错了。
posted on 2008-08-12 11:30  木神易  阅读(1800)  评论(1)    收藏  举报
刷新页面返回顶部
博客园  ©  2004-2025
浙公网安备 33010602011771号 浙ICP备2021040463号-3