Total Page Preview:   000000000529

What is session state in ASP.NET in English and Hindi



Session state in ASP.NET  in English:

In ASP.NET, a session state refers to a way to store user-specific information across multiple pages or requests. It allows you to persist data across different HTTP requests from the same client.

Here's an example of how to use session state in C#:
In this example, we store the value "John" in the Session state with the key "username". Later, we retrieve the value using the same key and cast it as a string. We can also check if the Session state contains a particular key before accessing it to avoid null reference exceptions.
It's important to note that Session state is specific to the user and is stored on the server. Therefore, it's not recommended to store large amounts of data in Session state as it can affect server performance.
Session state in ASP.NET in Hindi:
ASP.NET mein, session state ek tareeka hai user-specific jaankari ko multiple pages ya requests ke beech mein store karne ka. Ye aapko ek client ke alag-alag HTTP requests ke beech mein data ko persist karne ki anumati deta hai.
Yaha ek C# example diya gaya hai jisme session state ka upyog hai:

Is example mein, hum "username" key ke saath Session state mein "John" value store karte hain. Baad mein, hum same key ka upyog karke value retrieve karte hain aur use string mein typecast karte hain. Hum Session state mein koi vishesh key maujud hai ya nahi iska bhi check kar sakte hain, jisse null reference exceptions se bacha ja sake.
Dhyaan dena jaruri hai ki Session state user-specific hai aur server par store kiya jata hai. Isliye, Session state mein badi matra mein data store karna avashyak nahi hai kyunki isse server ki performance par asar pad sakta hai.

Thank You

About Author

Brijesh Kumar

Database Developer

I have more then 6 years Experience in Microsoft Technologies - SQL Server Database, ETL Azure Cloud - Azure SQL Database, CosmosDB, Azure Data Factory, PowerBI, Web Job, Azure Function, Azure Storage, Web Apps, Powershall and Database Migration On-Premise to Azure Cloud.
LinkedIn :





Facebook User: