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

  • Home
  • SEARCH
  • 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 6709693
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 26, 20262026-05-26T07:54:44+00:00 2026-05-26T07:54:44+00:00

Is it possible to set value to variable in httpmodule and read the value

  • 0

Is it possible to set value to variable in httpmodule and read the value of the variable in contentpage & masterpage?

I want to use this instead of session. The variable holds the value of the userID.

Because every page on my site creates a number of different database connections i think that one more is better than having session values?! What do you think?

I want to create a site that can grow large. (Always tries to program my sites in this way)
So thats why I want to take away a number of session values.

Thanks!

Mattias.

  • 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-26T07:54:44+00:00Added an answer on May 26, 2026 at 7:54 am

    you can use below Code snippet…..

    //Store data in Step1:
    HttpContext.Current.Items.Add("Key", "Value");
    
    //Retrieve data in Step2:
    object value = HttpContext.Current.Items["Key"];
    

    For more detail… Read these articles.

    http://www.shubho.net/2011/01/using-httpcontextcurrentitems-as-data.html

    http://forums.asp.net/t/1476647.aspx/1

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

Sidebar

Related Questions

Is it possible to set a default value for a variable argument list in
Is it possible to set a default value for columns in JPA, and if,
Is it possible to set the data in a ContentPlaceHolder through code? This is
Is it possible to set a variable in the system which is not for
Possible Duplicates: How would you set a variable to the largest number possible in
Is there a term to represent a set of all possible values a variable
The problem i am having is like this there is variable <core:set var=type>*one of:
Is it possible to set a value for a final attribute from a Private
how to terminate the thread when some variable value set to true? import threading
Possible Duplicate: How to change the value of ${user} variable used in Eclipse templates

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.