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 5847309
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 22, 20262026-05-22T12:42:01+00:00 2026-05-22T12:42:01+00:00

I have designing my web page The page is run but value are not

  • 0

I have designing my web page The page is run but value are not stored in database

The error:

An Error Occured While getting Data From Hdr_AccountType.

No mapping exists from object type System.Web.UI.WebControls.ListItem to a known managed provider native type.

protected void btnSave_Click(object sender, EventArgs e)
{
    Int32 st;
    int len = browser.PostedFile.ContentLength;
    byte[] pic = new byte[len];
    browser.PostedFile.InputStream.Read(pic, 0, len);

    SqlCommand Cmd = new SqlCommand();
    SqlConnection Cnn = new SqlConnection();
    string ConnectionString;
    ConnectionString = ConfigurationManager.ConnectionStrings["PhotostudioConnectionString"].ConnectionString;

    Cnn.ConnectionString = ConnectionString;
    if (Cnn.State != ConnectionState.Open)
        Cnn.Open();
    Cmd.Connection = Cnn;
    Cmd.CommandType = CommandType.StoredProcedure;
    Cmd.CommandText = "sproc_Ins_ManualPhotoSettingsDetails";
    Cmd.Parameters.Clear();
    // Cmd.Parameters.AddWithValue("@Id", txtBillNo.Text);
    Cmd.Parameters.AddWithValue("@Name", txtName.Text);
    Cmd.Parameters.AddWithValue("@Phoneno", txtPhoneno.Text);
    Cmd.Parameters.AddWithValue("@Startdate", rdpDate.SelectedDate); 
    Cmd.Parameters.AddWithValue("@Enddate", rdpDelivDate.SelectedDate);
    Cmd.Parameters.Add("@Systemurl", SqlDbType.Image).Value = pic;
    SqlParameter Src = new SqlParameter("@FilePath", SqlDbType.NVarChar, 450);
    Src.Value = browser.PostedFile.FileName;
    Cmd.Parameters.Add(Src);
    Cmd.Parameters.AddWithValue("@Work", TextBox1.Text);
    Cmd.Parameters.AddWithValue("@Size", cmbSize.SelectedItem);
    Cmd.Parameters.AddWithValue("@Rate", txtRate.Text);
    Cmd.Parameters.AddWithValue("@Noofcopies", txtNoofcopies.Text);
    Cmd.Parameters.AddWithValue("@Total", txtTotal.Text);
    Cmd.Parameters.AddWithValue("@Paidamount", txtPaid.Text);
    Cmd.Parameters.AddWithValue("@Balance", txtbal.Text);


    try
    {
        st = Convert.ToInt32(Cmd.ExecuteScalar());

    }
    catch (Exception ex)
    {            
        throw new ApplicationException("An Error Occured While getting Data From Hdr_AccountType." + ex.Message);
        lblError.Visible = true;
        lblError.Text = "An Error Occured While " + ex.Message.ToString();
        return;
    }
    Cmd.Dispose();
  • 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-05-22T12:42:01+00:00Added an answer on May 22, 2026 at 12:42 pm

    It’s not about clearing … you need to see why you have:

    No mapping exists from
    object type System.Web.UI.WebControls.ListItem to a known managed provider native type.

    I would bet that you need to use cmbSize.SelectedItem.Value instead of cmbSize.SelectedItem

    By the way, it’s a very bad concept to put Database access in your pages, you should create a Class just for handling the database part.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I've recently encountered a problem designing a web page. I needed to have rounded
I'm re-designing a Web site and I have a problem with the existing data
I have designing in my web page. I have used the gridview, I have
I'm new to web designing. I started to designing a sample page but I
I have a web page I'm designing, and I am trying to have icons
There many different opinions on this, but when designing a web page, what is
I am not a professional web-developer but I am designing one to help out
I'm designing my database and LINQ To SQL ASP.NET web application. Imagine I have
I have been tasked with designing my web services client code to use the
On a page that I'm designing I have a form with one input of

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.