Hi all i am working on mvc4 i have some issue here i am getting values from form collection
once i am getting that values i am storing in array like ‘String[]’ from that iam movint those
values to my data base table but i am getting always only one issue ‘input string was not in correct format’
could any body help me plz
here My code Follows:’
string[] BundleItemID = form.GetValues("txtbundleid");
for (int i = 0; i < skuid.Length; i++)
{
ProductBundleItem productbundleitem = new ProductBundleItem();
if (!string.IsNullOrEmpty(BundleItemID[i]))
{
productbundleitem.BundleItemId = Convert.ToInt64(BundleItemID[i]);
}
}
when i am trying to move values from ‘Convert.ToInt64(BundleItemID[i])’ to ‘BundleItemId’ i am getting an error
‘input string was not in correct format’
thanks in advance
Added a debug MessageBox so you can find the error.