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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T13:14:06+00:00 2026-05-26T13:14:06+00:00

I have an 3 tier application (DAL, BBL, UI) BBL at the moment do

  • 0

I have an 3 tier application (DAL, BBL, UI)
BBL at the moment do Nothing just a pass-thru

I have a grid view and for simplicity’s sake one text box(TB) and one drop down list(DDL).
and Two submit buttons.

(I changed my Custom Class to Object. just for this example)

First Submit button adds the TB.text & DDL.SelectedValue to a Object X in the UI.

the BBL takes that object X to adds it to a List(X) in the BBL.

Then the BBL should populate the Gridview with the List(X). (with ajax partial page load)

the second Submit should send the full List(X) to the database.

The problem im having is when I click the first Submit(the local) I dont get new Rows just keep over writing the same row. what am I Missing?

in the UI class

   private businesslogic blogic = new businesslogic();

   protected void B1_local_Click(object sender, EventArgs e)
    {

        object x = new object();
        x.id = Convert.ToInt32(TB_1.Text);
        x.var1 = Convert.ToInt32(DDL_1.SelectedValue);

        blogic.addrowtolist(x);

        Gridview1.DataSource = blogic.grablist();
        Gridview1.Databind();

     }

in the BBL class

    public List<object> locallist = new List<object>();
    public void addrowtolist(object x)
    {
       locallist.Add(x);

    }
    public List<object> grablist()
    {
     return locallist;
    }
  • 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-26T13:14:06+00:00Added an answer on May 26, 2026 at 1:14 pm

    With every postback, you’re loading a new BL with a new (empty) List. To see your List grow, you’re going to need to save it somewhere that persists (doesn’t disappear) between one request and the next.

    I would recommend putting your List in a Session key

    Session["items"] = blogic.locallist;
    

    and then pulling it out and sending it to a second BL constructor on postback. This is probably simplest, but not always the correct approach.

    http://msdn.microsoft.com/en-us/library/z1hkazw7.aspx

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

Sidebar

Related Questions

I have one problem. I have made solution and it is 3-tier application. So
I have an n tier application with presentation layer, business layer, DAL and business
I have a multi-tier application. DAL -> BAL -> Business Gateway ->UI. If a
I have 3-tier EJB application, and I need to create a view on a
I have an MVC2 n-tier application (DAL, Domain, Service, MVC web) using a DDD
I have a three-tier application which is installed in corporate environments. With every server
I have attempted to make my first 3 tier application. In the process I
I have a three-tier Windows Forms DB application in VB.NET. I'm using VS 2005.
I have an n-tier application with the different tiers running on different machines. I
I have a 3 tier application that requires security authorizations be placed on various

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.