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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 6, 20262026-06-06T12:39:40+00:00 2026-06-06T12:39:40+00:00

I m using MVC architecture in ASP.NET 3.5. In edit I’m getting the above

  • 0

I m using MVC architecture in ASP.NET 3.5. In edit I’m getting the above error.

1) I have used stored procedure:

ALTER PROCEDURE [dbo].[editparty]

    (
    @pcode nvarchar(50),

    @cname nvarchar(100),

    @cont  nvarchar(50)
    )
AS


update tbl_party set party_name=@cname,party_code = @pcode,party_contact =@cont where party_id=(Select party_id  from tbl_party where party_code = @pcode)

2) This is my function in DAL class file:

public DataSet editp(BOParty pcode, BOParty PName, BOParty Tel)
        {
            OpenCnn();
            SqlCommand cmd = new SqlCommand("editparty", cnn);
            cmd.CommandType = CommandType.StoredProcedure;
            SqlParameter[] par = { new SqlParameter("@pcode", pcode.pcode), };
            cmd.Parameters.AddRange(par);
            SqlParameter[] nm = { new SqlParameter("@PName", pcode.pcode), };
            cmd.Parameters.AddRange(nm);
            SqlParameter[] tl = { new SqlParameter("@Tel", pcode.pcode), };
            cmd.Parameters.AddRange(tl);
            SqlDataAdapter ad = new SqlDataAdapter(cmd);
            DataSet ds = new DataSet();
            ad.Fill(ds);
            return ds;
            CloseCnn();


        }

3)this in in BAL class file

    public DataSet editp(BOParty pcode, BOParty PName, BOParty Tel)
    {
        DataSet ds = new DataSet();
        ds = new DataSet();
        ds = editp(pcode, PName, Tel);
        return ds;
    }

4) This is in .cs file:

    protected void edit_Click(object sender, EventArgs e)
    {

        pcode.pcode = txtpcde.Text;
        pcode.Tel= txtcont.Text;
        pcode.PName = txtcname.Text;

        DataSet ds = new DataSet();
        ds = new DataSet();
        ds = pcode.editp(pcode, PName, Tel);

        edit.Enabled = false;

    }
  • 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-06T12:39:42+00:00Added an answer on June 6, 2026 at 12:39 pm

    Look your editp function at the highlighted line:

    public DataSet editp(BOParty pcode, BOParty PName, BOParty Tel)
    {
        DataSet ds = new DataSet();
        ds = new DataSet();
        ds = editp(pcode, PName, Tel); // <--- HERE
        return ds;
    }
    

    You call editp recursively then it’ll cause StackOverflowException. I think you would like to call editp method in the DAL class but there you’re calling the same editp method again and again.

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

Sidebar

Related Questions

I am using ASP.NET MVC architecture.I have a telerik window on a button click,
i'm using Asp.net MVC with Sharp Architecture. I have this code: return _repositoryKeyWord.FindAll(x =>
I am new in Asp.net MVC.i have created mvc application using datasource but i
I am using s#arp architecture 2.0 with asp.net mvc 3.0. The razor code in
I currently have an ASP.NET MVC project built on top of the S#arp architecture
I have about 4-6 years .NET experience. Primarly using ASP.NET MVC/Nhibernate/Castle Windsor/MSpec/etc in visual
I am using these technologies: SQL Server 2005, ASP.NET MVC, NHibernate/sharp architecture and would
I am using MVC 3 architecture in my project. I have a master page
Hey guys! I'm using ASP.NET MVC to develop an application for a library with
In my latest ASP.NET MVC 2 application I have been trying to put into

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.