0
My scenario is this::
The user will log into the system. Then a list of items will be displayed and he will choose a.
Then I need the system to store the logged in user and the item he chose.
I don’t know how I can be doing this and I don’t know the technologies I might be using.
Currently for authentication of my projects I use Formsauthentication, however the same can not store more than one value (at least I do not know).
I found the following alternative:
Forms.SetAuthCookie (UserName + "|" + UserId, true);
if (HttpContext.Current.Request.IsAuthenticated)
{
userId = Convert.ToInt32(HttpContext.Current.User.Identity.Name.Split('|')[1]);
}
I also thought about the use of Session
, but I think there’s a more appropriate technology.
I think you should review your question... It doesn’t seem to have any kind of research effort
– CesarMiguel
@Cesarmiguel, I edited my question, but I don’t know what else to put.
– Diego Zanardo
How long do you need to store this information? For a few minutes? Months? Forever? This storage is only for user convenience to return to the site and review things as you selected them last time, or you will do some analysis or processing on your side?
– Oralista de Sistemas
@Renan, for a short time... The time that lasts the Formsauthentication....
– Diego Zanardo
That kind of made no sense. I think if you tell me what you’re going to do with this information it’s easier. But I’ll risk an answer.
– Oralista de Sistemas