Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 9041831
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 16, 20262026-06-16T10:19:59+00:00 2026-06-16T10:19:59+00:00

Hi all i am working on mvc4 i have some issue here i am

  • 0

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

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-16T10:20:01+00:00Added an answer on June 16, 2026 at 10:20 am

    Added a debug MessageBox so you can find the error.

       string[] BundleItemID = form.GetValues("txtbundleid");
    
        for (int i = 0; i < skuid.Length; i++)
        {
            ProductBundleItem productbundleitem = new ProductBundleItem();
            if (!string.IsNullOrEmpty(BundleItemID[i]))
            {
                long val = 0;
                if (!long.TryParse(BundleItemID[i], out val))
                {
                    MessageBox.Show(string.Format("{0} is not a valid Int64 value", BundleItemID[i]));
                    break;
                }
                productbundleitem.BundleItemId = val;
            }
        }
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I am filling a listview from names of a database. That is all working
I have Font Awesome, Less, Twitter Bootstrap and MVC4 all working nice together in
Description: I have a simple form in an MVC4 application that has 5 textboxes
Hi all I am working on MVC4. I have uploaded a single image file,
We have three developers and one tester all working against the same database. We
I have a draggable table which all working fine, though I want to be
I'm working through the NerdDinner ASP.NET MVC 1.0 example. I have it all working
i have a dynamic php web page localhost/ctd/index.php All working good except if i
I have been having a wierd issue that is driving me absolutely crazy. It
I'm trying to implement drag/drop in my TreeView and have it all working except

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.