Click here to Skip to main content
15,888,286 members
Home / Discussions / ASP.NET
   

ASP.NET

 
AnswerRe: About Online Shopping In Asp.net and linq Pin
F-ES Sitecore4-Jan-16 22:48
professionalF-ES Sitecore4-Jan-16 22:48 
AnswerRe: About Online Shopping In Asp.net and linq Pin
Afzaal Ahmad Zeeshan5-Jan-16 0:05
professionalAfzaal Ahmad Zeeshan5-Jan-16 0:05 
Questionasp.net mvc with desktop ui. HowTo? Pin
Frygreen4-Jan-16 9:23
Frygreen4-Jan-16 9:23 
AnswerRe: asp.net mvc with desktop ui. HowTo? Pin
Afzaal Ahmad Zeeshan5-Jan-16 0:26
professionalAfzaal Ahmad Zeeshan5-Jan-16 0:26 
AnswerRe: asp.net mvc with desktop ui. HowTo? Pin
Frygreen5-Jan-16 13:10
Frygreen5-Jan-16 13:10 
QuestionAdding Objects To Session Pin
ASPnoob4-Jan-16 7:15
ASPnoob4-Jan-16 7:15 
AnswerRe: Adding Objects To Session Pin
ZurdoDev4-Jan-16 8:24
professionalZurdoDev4-Jan-16 8:24 
AnswerRe: Adding Objects To Session Pin
Mathi Mani4-Jan-16 8:58
Mathi Mani4-Jan-16 8:58 
The issue is where you add the accts which is a List<Account> to the session.
These two lines of code always replace whatever object present in Session["acctObjects"]
C#
accts.Add(acct);
Session["acctObjects"] = accts;

To avoid the overwrite, whenever you want to add a Account to List<Account> stored in session, get the List from session, add new Account to that list and store it back to session. Here is how you can do it.

C#
if (Session["acctObjects"] != null)
    accts = (List<acct>)Session["acctObjects"];
accts.Add(acct);
Session["acctObjects"] = accts;

AnswerRe: Adding Objects To Session Pin
ASPnoob4-Jan-16 10:55
ASPnoob4-Jan-16 10:55 
GeneralRe: Adding Objects To Session Pin
F-ES Sitecore4-Jan-16 22:46
professionalF-ES Sitecore4-Jan-16 22:46 
GeneralRe: Adding Objects To Session Pin
Richard Deeming5-Jan-16 2:28
mveRichard Deeming5-Jan-16 2:28 
GeneralRe: Adding Objects To Session Pin
F-ES Sitecore5-Jan-16 2:59
professionalF-ES Sitecore5-Jan-16 2:59 
GeneralRe: Adding Objects To Session Pin
Richard Deeming5-Jan-16 7:34
mveRichard Deeming5-Jan-16 7:34 
GeneralRe: Adding Objects To Session Pin
F-ES Sitecore6-Jan-16 22:47
professionalF-ES Sitecore6-Jan-16 22:47 
QuestionCreate an ASP.NET Page with a scheduler application Pin
Helgard W29-Dec-15 21:40
Helgard W29-Dec-15 21:40 
SuggestionRe: Create an ASP.NET Page with a scheduler application Pin
Richard MacCutchan29-Dec-15 22:38
mveRichard MacCutchan29-Dec-15 22:38 
GeneralRe: Create an ASP.NET Page with a scheduler application Pin
Helgard W29-Dec-15 22:45
Helgard W29-Dec-15 22:45 
AnswerRe: Create an ASP.NET Page with a scheduler application Pin
Anurag Gandhi29-Dec-15 22:45
professionalAnurag Gandhi29-Dec-15 22:45 
AnswerRe: Create an ASP.NET Page with a scheduler application Pin
Helgard W29-Dec-15 22:47
Helgard W29-Dec-15 22:47 
AnswerRe: Create an ASP.NET Page with a scheduler application Pin
Zubair Khan May202324-May-23 2:01
Zubair Khan May202324-May-23 2:01 
Questionweb form application accessing ssrs reports Pin
dcof28-Dec-15 6:34
dcof28-Dec-15 6:34 
QuestionFreddy Kruger Fixed Pin
BobbyStrain24-Dec-15 7:16
BobbyStrain24-Dec-15 7:16 
Questionhow to start android mobile app development Pin
Member 1187868023-Dec-15 8:30
Member 1187868023-Dec-15 8:30 
AnswerRe: how to start android mobile app development Pin
Richard MacCutchan23-Dec-15 10:32
mveRichard MacCutchan23-Dec-15 10:32 
AnswerRe: how to start android mobile app development Pin
Caroll Bert30-Dec-15 19:40
Caroll Bert30-Dec-15 19:40 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.