Tech
Forums
Jobs
Books
Events
Videos
Conference
Annual Conference
Bcrypt
Ai Conference
Live
More
Interviews
Certification
Training
Career
Members
News
Blogs
Contribute
An Article
A Blog
A Video
An Ebook
An Interview Question
Register
Login
3
Answers
Session Variable Gets Changed
Ask a question
Ask a question
Upload Source Code:
Select only zip and rar file.
Vishwas Kadamannaya
13y
2k
1
Reply
Hi All,
Iam Using Session to pass values to another Page. Iam using ArrayList in Session.
In next page am deleting some list items
In Session["ContrcatList"] i have around 20 items and i delete some items based on contractId which is unique for each item in array list, but when i again use Session["ContractList"] this get modified(ArrayList after deletion of some items) and i dont get the orginal value. How i will get original value and i need 2 modify Array list as well.
ArrayList listOfContract = null;
listOfContract = (ArrayList)Session["ContractList"]; // here listOfContract.Count = 20
ArrayList ar1 = new ArrayList();
ar1 = listOfContract;
ar1[0] = listOfContract[contractId];
ar1.RemoveRange(1, ar1.Count - 1);
ArrayList listOfContract1 = null;
listOfContract1 = (ArrayList)Session["ContractList"]; // here listOfContract.Count = 1;
Post
Reset
Cancel
Answers (
3
)
Next Recommended Forum
Get no of months.....
by giving the duration how can i get the date?