TECHNOLOGIES
FORUMS
JOBS
BOOKS
EVENTS
INTERVIEWS
Live
MORE
LEARN
Training
CAREER
MEMBERS
VIDEOS
NEWS
BLOGS
Sign Up
Login
No unread comment.
View All Comments
No unread message.
View All Messages
No unread notification.
View All Notifications
Answers
Post
An Article
A Blog
A News
A Video
An EBook
An Interview Question
Ask Question
Forums
Monthly Leaders
Forum guidelines
Praveen Kumar
NA
33
5k
How to declare a Globar Variable in C#?
Jul 14 2017 2:45 AM
Currently I am declaring Global variable as
public static string SerialNo;
I am set value into Declared SerialNo in Page_Load event.
I am using this serial no in multiple methods.
But my problem is
Suppose there is multiple persons accessing the same page at the same time In my application mutiple tabs available like Employee Details, Salary Details, ....
A user has two records in Employee Details tab.
B user updated data in Employee Details tab.
Both are using different serial no's but accessing same page.
Now A user refresh Employee Details tab he got 3 records(3rd record updated by B user).
I am thinking the problem is not declaring SerialNo variable properly.
Please help me how to declare that SerialNo variable Globally.
Reply
Answers (
2
)
How to upload the file even after doing the post back.
Inserting data if i click on button