我的代码是
#region LikeExceli
DynamicData dd = new DynamicData();
dd.GerceklesenIMP = Convert.ToInt32(item["Impressions?"].ToString().Replace(",", ""));
dd.GerceklesenClick = Convert.ToInt32(item["Clicks?"].ToString().Replace(",", ""));
dd.CampaignName = item["Campaign?"].ToString();
dd.AdvertName = item["Advert Name"].ToString();
dd.GercekHarcamaUSD = fr.ConvertMoney(item["Spent?"].ToString());
dd.Likes = Convert.ToInt32(item["Page likes?"].ToString().Replace(",", ""));
dd.FK_Campaign = kampanyaid;
dd.CPMUSD = Convert.ToDouble(item["CPM?"].ToString().Replace(".", ","));
dd.CPCUSD = Convert.ToDouble(item["CPC?"].ToString().Replace(".", ","));
dd.CreateDate = DateTime.Now;
#endregion
我的错误是:Input string was not in a correct format.
但是我的代码在 localhost 中运行没有任何问题。当我上传服务器时,我收到了这个错误。
注意:我正在导入一个 excel 文件。