Free templates
Menu Search Free templates

Send data with session variables (C#, VB and ASP.NET) | Free code

Here you can download free code (C# and VB) to retrieve data from and save data to session variables so that data can be sent between web pages in a website.

When a user moves from one web page to another web page is it not possible to use the data that is stored on the web page that the user has been transferred from, data must be stored or sent to the web page that the user is redirected to.

One way to send data to a web page without having to save data in a database is to store data in one or more session variables. Data stored in a session variable can easily be obtained on a web page like a content page or a master page as long as the data is stored in a session variable according to the session settings in the "Web.config" file.

Settings for session variables are created in the "web.config" file where you can state where data is saved by the "mode" argument, "InProc" means that data is stored locally, "StateServer" means that data is stored on a web server and "SQLServer" means that data is stored in a SQL database. You can specify whether data should be saved in cookies or not and the time in minutes for how long data should be stored in session variables.

This template for session variables includes instructions for settings regarding "sessionstate" in the "Web.config" file and a web page that retrieves and stores data in session variables.

Remember that you in your web hosting account must have made a setting for the correct version of "ASP.NET" on your website (the version listed in the "Web.config" file). We are using Visual Web Developer 2005 (2010) Express Edition for web programming.
Updated: 01/01/2015 | Created by All-templates.biz

Download Send data with session variables (C#, VB and ASP.NET) | Free code ยป

Tags: web code parameters