I use the session ....
Session["var"] = some value or object.
Then you can call that variable any time for the users Session.
EDIT:
Make a public static variable outside of a method and just in the Class.
totally there are 3 types C # Asp dot net Vb dot net
In VB.NET, global variables can be declared using the Public keyword within a module or a class that is not instantiated, making them accessible throughout the entire application. For example, you can create a module and declare a variable like Public GlobalVar As Integer. To use this global variable in any part of your code, simply reference it directly by its name. Keep in mind that while global variables can simplify access to data, they can also lead to code that is harder to maintain and debug.
What is the use of Ispostback in dot net?"
.com=comershal .net=network
Full Form OF Dot NET- - DOT Means Data object technology and net means Network enable technology anju jaiswal
you must have forgotten to add parameters , in sql and asp.net when u want some queries u must add parameter to your query like cmd.Parameters.AddWithValue("@student_name", txtName.Text); if u dont add @student_name it will show u a error needing to declare sclar variable
dot in dot net is basically a semantic for "." (period symbol) its probably symbolizes dot com applications
cause it sounds cool i guess
The net in .net means either interNET or NETwork
commercial for com
Microsoft created and supports .NET.
Books by Microsoft Press and Apress are good resources for dot net for C#, VB, ASP net