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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 27, 20262026-05-27T03:23:30+00:00 2026-05-27T03:23:30+00:00

I was wondering if anyone could help me understand if what I am doing

  • 0

I was wondering if anyone could help me understand if what I am doing is a lot of overhead or not. It is currently working but I am not sure if this could slow down the site or not.
I have a workflowobj class in which i set all the session variables. This class in instantiated on the pages that need it:

WorkFlowObj wfo = new WorkFlowObj(this.Session, this.Response);
wfo.VendorRedirect();

I need this because I need to be able to keep track of session variables and at the same time be able to keep track of a more complicated page workflow in one place. This solution already already works for me, but the only problem is that I am not sure if passing around the session and the response objects creates a lot of OVERHEAD. Can anyone tell me if this is terribly inefficient?? Below is the code for the workflowobj class.

    public class WorkFlowObj
    {
        private System.Web.SessionState.HttpSessionState _pagesession;
        private HttpResponse _HttpResponse;

        private int _userid;
        private string _vendorname;
         ///private other vars here
     }
    public int UserID
    {
        get
        {
            return _userid;
        }
    }


    public WorkFlowObj(System.Web.SessionState.HttpSessionState pagesession, HttpResponse _response)
    {
        _pagesession = pagesession;
        _HttpResponse = _response;
         Initialize();

    }

    private void Initialize()
    { 
    //initialize variables from session
    _userid=_pagesession["userid"].ToString();
    }


    public void VendorRedirect()
    {
        switch (this._vendorname)
        {

            case "1":
                this._HttpResponse.Redirect(page1);
                break;
            case "2":
                this._HttpResponse.Redirect(page2);
                break;
                //etc
            default:
                //dostuff;
                break;
        }
    }
}
  • 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-27T03:23:31+00:00Added an answer on May 27, 2026 at 3:23 am

    I would not create dependencies to System.Web in your workflow objects, just pass the variables that the workflow objects need to make decision and execute business logic. There is no overhead passing objects around, they are just pointers under the hood.

    One issue I could see happening is accidental use of statics in another layer that get tied to your Page state, thus not allowing the GC to clean up ie: classic out of memory exception or app pool recycle.

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

Sidebar

Related Questions

I was wondering if someone could help me understand what this code is doing.
I was wondering if anyone could help me with getting this working. I'm using
I was wondering if anyone could help me out (not with code, although that
I was wondering if anyone could help me with this problem i'm having. I
Just wondering if anyone could help me with this. I'm new to actionscript, and
I was wondering if anyone could help with this. Let' say I have a
I was wondering if anyone could help me with this. I have to create
was wondering if anyone could help me find the regular expression for this problem.
So I was wondering if anyone could help me understand how the jQuery 'class'
I was wondering if anyone could help clear up this issue I am having.

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.