I'm implementing IHttpHandler and IRequiresSessionState and I'm using context.Session but after I set up a value in Session, it's lost in the next request. What can I do to persist the values ?
I have a filter on my MVC web site. I display some records in a few different controller actions but when moving from one action to another I want to apply those filter values.
How can I persist values from controller to controller?
Should I use Session? TempData?
I am using Structure Map for IOC.
Maybe I could have a class that contains a Property for each Session Value that I use in my application and inject it on the controllers that need session?
Just wondering whether or not Session Variables that are declared and set while in a HTTP session will continue to exist if the users session moves to HTTPS?
i want to hold data at runtimeEx-I have a 3 Services A,B,C and in A,B,C contain services list,then if user select A service and 3 services in a A Listagain user select B service and 2 services in a B Listand again user Select C Service and select 1 services in a C listSo How i can hold data A,B,C services ID'S value with respect to services listID'S value at runtime.
If I have a 2 control load events and one page load event subs and the control1_Load events fires first, can I lookup some database things and persist them? I would like to use the persisted data in the other two events when they fire. Normally I've been using session variables , is there a better way?
Im binding the gridview in page load.After i click the link button in the gridview it displays another gridview.I have a checkbox in that gridview.I check some of the checkboxes.while i click the save button i want to get that checkbox state whether its checked or not.Bt for me its showing no records in the grid.How do i persist my data and get the checbox's state.
I have web service with reference of BO library in same application. My BO contains classes with some private members and respective public properties.
All of these private members had default values in a perticular class say Contact.cs.Now when I consume this webservice into Windows Application, these already assinged values to BO does not persists in the Windows Application code.
Is there any limitation such that you can serialize the default values assosiated with private members ?
Even I have tried to assign these values directly to the properties in a constructor of Contact class.
i have two text boxes and one button in web form. I need to display the contents of text boxes in a datatable in the same form, when i click on the button.
How can i do this using session array. I need to store values in session array. and get back the values from session when i need .
I would like to know the method of passing session variables/values to a subdomain from the main website.For eg : Upon user login, I would like to set some session variables and redirect the page to a subdomain URL.
How can this be done? fyi... I have setup two websites in IIS. One is localhost and the other is subdomain.localhost
So, If I want to retrieve the session values in subdomain.localhost (which points to a specific folder in the app), how should I go about it?
I am reviewing some web code and I am not exactly sure how ASP.net session state works. If a User object is saved to the session state during login, and User.FirstName and User.LastName is set. If other web pages retrieve the user object from the session and set the FirstName to something else is that persisted on other web pages? Or, do you need to re-add the user object back to the session once it has been modified?
I've got some ASP pages where the session variable values get blown away BEFORE the session times out. I can't understand it. For example: if a user logs into my ASP app using his password which is stored in a session variable, it will be fully accessible for a few minutes and then all of a sudden.....Wham session variable with password value is gone. And the session timeout is far from expired. The session variable is not being touched in any way after it gets initialized with a value.
I need to pass some values around using session state. My approach is to first check if my session variable is null and if it is not, then proceed with my C# logic. Is that correct? Will my Session variable ever contain garbage in it, like a corrupted string? Or will I be guaranteed that it is null if not explicitly set. if(Session["MyVariable"]!=null { // Do some logic }
I am using C#. I have got below format values in my SESSION variable ["FROMDATA"], I am using DICTIONARY to store the FORM Posted Data. see the related question.
Now I want to create a CLASS with METHOD in it, in which I will just pass the "KEY" and it will first check it for NULL OR EMPTY and then it will return its value from the SESSION Variable ["FROMDATA"].
consider this scenario: a user on my website has a profileID. There are some pluginID's associated with this profileID.
E.g.: User1 might have 2, 3 and 5 plugins associated with his profile.
When the user logs in, I store the profileID of the user in a session variable cod. ON a certain page, the user tries to edit the plugins associated with his profile. So, on that page, I have to retrieve those pluginID's from the DB.
I have applied this code but this fetches only the maximum pluginID from the DB and not all the pluginID's.
[Code]....
I was trying to figure out how can I store multiple pluginID's in this session variable?
I need to query for a session variable called 'steps' every 10 seconds from my Webform in ASP.Net using javascript. This session variable holds an integer value.
i have a list for my shopping cart which i currently store in my datatable and then store it in a session. to avoid using sessions is it best to create a class where the datatable is stored and can be accessed from anywhere?
I created HttpHandler class in ASP.NET and configured a website to handle any request with the *.test path.
public class GameHandler : IHttpHandler, IRequiresSessionState { public bool IsReusable { get { return false;
[Code]....
I suspect the problem is that ASP.NET doesn't know these requests sent from javascript belong to the same session and that's why the Session values are lost.
I have added objects to the session state in an aspx page which is using an object datasource.I want to get the session value in the class library which is used by the object datasource.