Asp.net session state Part 62

preview_player
Показать описание
Text version of the video

Healthy diet is very important both for the body and mind. If you like Aarvi Kitchen recipes, please support by sharing, subscribing and liking our YouTube channel. Hope you can help.

Slides

All ASP .NET Text Articles

All ASP .NET Slides

All Dot Net and SQL Server Tutorials in English

All Dot Net and SQL Server Tutorials in Arabic

Different techniques to send data from one webform to another
1. Cross Page Postback: Discussed in Part 55 and Part 56
2. Context.Handler object - Discussed in Part 58
3. Query strings - Discussed in Part 59
4. Cookies - Discussed in Part 60 and Part 61
5. Session state - Will be discussed in this session

The following concepts will be discussed in the subsequent sessions
6. Application state

Just like Query strings, Session State variables can also be used to send data from one webform to another.

Points to remember about session state variables:
1. Session state variables are stored on the web server by default, and are kept for the life time of a session.

2. The default session state mode is InProc. We will discuss about different session state modes in a later video session.

4. Session state variables are available across all pages, but only for a given single session. Session variables are like single-user global data.

5. It is always a good practice to check, if a session state variable is null before calling any of its methods, such as ToString(). Otherwise, we may run into runtime NullReferenceExceptions.
if (Session["Name"] != null)
{
lblName.Text = Session["Name"].ToString();
}

6. Application performance can be improved by disabling session state, if it's not required. Session state can be turned off at the page or application level.
a)To turn of the session state at the page level, set EnableSessionState="False" in the page directive
Рекомендации по теме
Комментарии
Автор

Thank you very much for taking time to give feedback. In the description of this video, I have included the link for ASP .NET, C#, and SQL Server playlists. All the videos are arranged in logical sequence in these playlists, which could be useful to you. Please share the link with your friends who you think would also benefit from them. If you like these videos, please click on the THUMBS UP button below the video. For email alerts, when new videos are uploaded, you may subscribe to my channel.

Csharp-video-tutorialsBlogspot
Автор

Spent two weeks looking for details on how to do this very basic task for working with sessions across multiple pages, without being absolutely candy-land for hackers with the post methods suggested in the documents on-line.


Great job, you gave me precisely what I was looking for!

mrwonk
Автор

will this session work on .net 5.0 Core API and client is Angular 10

KingresearchAcademy
Автор

Awesome tutorials. Better than paid courses. Thank you so much!

vugar
Автор

Session variables can be shared between applications, if they use out of process session management techniques like (State Server, or SQL Server). It is not possible to share session variables between applications using InProc session state mode. Query strings can also be used to pass data from one application to another application.

Csharp-video-tutorialsBlogspot
Автор

So why is it that when I go to class and waste 2hours in the classroom,  after commuting for one and a half hours EACH WAY, I end up understanding nothing! however, on the other hand, less than 12 minutes with you, I understand the whole lesson?!
I can't thank you enough Sir,
You may not know it, but you make many peoples' lives easier.
Thank you.

qualityrenov
Автор

Brilliant. The most i have learned about programming in 2 years, in just 11 minutes.Thank you for this very clear view of this"device" known as session state. I am in a web buildng class trying to do something that should be very simple, and this just helped a ton.Thank you!

jetpaq
Автор

your videos are straightforward and easy to follow. Thank you

ghada
Автор

I always end up in some of your videos! Great work!

willac
Автор

From all the methods you have shown to pass data between webforms which one would you say is better to use?

juliobarriga
Автор

Thats a good question, im curious to hear his answer! I voted this up because I think what you said is correct, setting session state to false improves it "Because" you have no sessionstate data, therefore the elements that are using and information, needn't run anymore, freeing up additional resources, hence improving performance. I want to see what Venkat says though.

jetpaq
Автор

Session["Name"] and Session["Email"]. I have a question, where you have defined Name and Email. I am creating a session like this. I am getting

priyalavanya
Автор

To turn of the session state at the application level, set SessionState mode=off in the web.config file.
In the slide it is written as SessionState mode=false

dineshyd
Автор

Hi Venkat,

Thanks for the excellent video. I have a question here, does explicitly setting sessionstate mode to false improves web application performance even though none of my webforms use the session state variables. Basically, my question is explicit setting off of sessionstate improves performance even though my web app doesn't have a single session variable.

Thanks.

indurnuguri
Автор

Best tutorial. Is this jarvis speaking or human?? English is so accurate..

caffekhalisa
Автор

Venkat: Should I use cookies or session variables? Also, can you point me to the vid that tells me why my values from first form are cleared when I go back?

MrHooglaz
Автор

Hi Venkat nice tutorial. Thanks lot. I have a small doubt. Lets say you have two web application hosted on the same server. Is it possible to use session variables to pass data between these two applications. ie Is it the session variable accessible in both applications. If not what are other options available. I was asked this question in an interview. Please provide me a feedback. Thanks.

ajanthankt
Автор

thank you very much for this valuable information.

vaibhavyadav
Автор

Character In the video It's great, I like it a lot $$

duytran
Автор

thank you so much for your video lessons ! :-)

How to Redirect to another web page when the session times out ???

jayaprakashj