Can somebody please explain to me the difference between:
Session.Add("name",txtName.text); and Session["name"] = txtName.text;
It was an interview question and I answered that both store data in key = "Value" format like Dictionary class in C#.
Am I right, or is there any difference?
Looking at the code for
HttpSessionStateshows us that they are in fact the same.As for them both
They actually store the result in an
IHttpSessionStateobject.