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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 4, 20262026-06-04T07:45:14+00:00 2026-06-04T07:45:14+00:00

When i click the Save Button in my page, it executes this protected void

  • 0

When i click the Save Button in my page, it executes this

protected void btnsave_Click(object sender, EventArgs e)

and then it calls save() function.
In save() function it calls stored procedure insertcustrec5. As soon as it reaches to the stored procedure insertcustrec5, it raises error

“Procedure or function ‘insertcustrec5’ expects parameter ‘@tb1’,
which was not supplied”

but i supplied..n i checked every parameter getting its value still this error keeps on occurring.

–> My Stored Procedure is:

ALTER procedure [dbo].[insertcustrec5]
 (
   @RID int,
   @Remarks varchar(MAX),
   @CRDate date,
   @ChallanNo float,
   @Quantity float,
   @tb1 int,
   @Amount float
 )
 As
 INSERT INTO Customer_Receive(ChallanNo, CRDate, RID, Quantity, Remarks,CustID,Amount)
 VALUES     (@ChallanNo,@CRDate,@RID,@Quantity,@Remarks,@tb1,@Amount)

–> Save Function which calls Stored procedure is:

public void save()
    {

        data.AddParameter("RID", this.rid);
        data.AddParameter("CustID", this.tb1);
        data.AddParameter("Remarks", this.remarks);
        data.AddParameter("CRDate", this.CRDate);
        data.AddParameter("ChallanNo", this.ChallanNo);
        data.AddParameter("Quantity", this.quantity);
        data.ExecuteNonQuery("insertcustrec5");

–> ExecuteNonQuerry Function:-

public int ExecuteNonQuery(string commandText)
    {
        try
        {
            SqlCommand command = new SqlCommand(commandText);
            command.CommandType = System.Data.CommandType.StoredProcedure;
            this.OpenConnection();
            command.Connection = this.connection;
            command.Parameters.AddRange(cmdParams.ToArray());
            return command.ExecuteNonQuery();
        }
        finally
        {
            this.CloseConnection();
        }
    }

–> Save Button Click:-

 protected void btnsave_Click(object sender, EventArgs e)
    {
        bllCustomer_Receive receive = new bllCustomer_Receive();
        string datetime = txtcrdate.Text;
        DateTime dt = DateTime.ParseExact(datetime, "d/M/yyyy", null);
        receive.CRDate = dt;
        receive.ChallanNo = txtchallan.Text;
        receive.rid = txtrid.Text;
        receive.quantity = float.Parse(txtquantity.Text);
        receive.remarks = txtremarks.Text;
        tb1.Text = Convert.ToString(drpdwncustID.SelectedItem);
        receive.tb1 = tb1.Text;
        receive.save();
    }
  • 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-04T07:45:16+00:00Added an answer on June 4, 2026 at 7:45 am

    Write while adding parameters to sp

    data.AddParameter("tb1", this.tb1);
    

    instead of

     data.AddParameter("CustID", this.tb1);
    
    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

$('#ms_cats_meta_eduyear, #ms_cats_meta_semester, #ms_cats_meta_subject').change(function () { $('#publish').removeClass('button-primary-disabled'); $('#save-post').removeClass('button-disabled'); $('input#publish').click( function () { var eduyear_val =
I currently have a simple form that when you click the save button will
I am using the TSaveDialog component to save a file from a button click.
my ajax is : $('#save').click(function(){ $.post(http://127.0.0.1:8080/sss, function(data){ alert(data); }); }) and the django view
I've got a web page where I need a user to click the save
My Contact us form doesn't show UpdateProgress when i click the save button. Below
In my web application when i upload a video and click the save button,
I have an asp.net page with a save button within an updatepanel and contenttemplate.
On my ASPX page, there is a button with this code: OnClick=save_Click Is it
I have a function called save(), this function gathers up all the inputs on

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.