Search

You searched for the word(s): userid:94971

Matching Posts

  • Re: How to Execute code when closing the Browser

    Not sure if you figured it out but I think after reading your posts you may have a misunderstanding of how session is handled by asp.net. Your session is maintained by the server and is a sliding expiration of 20 minutes by default or whatever you have in your web.config. When the user closes their browser this session doesn't expire until this 20 minutes after the users last page request. The asp.net server isn't aware or informed as to when the user closes their browser it still waits for
    Posted to Web Forms (Forum) by Snowst on 8/22/2009
  • Re: How to Execute code when closing the Browser

    kpyap is right, you can't delete the cookie based on the session end event because this event is fired on your server and is not connected to a browser request. I'm not sure sure Session.Abandon will work either but it would be interesting to see what happens. I think the best way to achieve what you want is to set a non-persistant cookie by not setting an expiration when creating the cookie. This will cause the cookie to be stored with the session on the server side, but never get written
    Posted to Web Forms (Forum) by Snowst on 8/10/2009
  • Re: Routing to web forms

    I think you have to specify literal values for mappings, meaning things like {id} will not work where the route would literally be mapping from info/default/{id} where you're never going to have the literal value of {id} in the path. It would work if you included a literal mapping of all of your possible ids to where you want them to redirect like "info/default/12" where your id is 12. I'm not sure why you're trying to get away from querystrings for this. If the goal is to make
    Posted to Web Forms (Forum) by Snowst on 8/10/2009
  • Re: Sorting Collection objects inline with LINQ

    SortedList<T> wouldn't work for what I'm trying to do because I have a Collection of Classes which in this case is called Field.cs, that contain multiple properties like "FieldName", "SortPhysicalOrder", "Title" and I want to be able to sort the collection by whatever property I want with a simple method call like the one I attempted above. SortedList<T> requires a key and sorts on Keys where the key is a fixed data type. My goal from this is to create
  • Re: Linq to Object performance

    I've found when I do these tests the numbers are more reliable in release mode. Does it make any difference if you switch to release mode?
  • Re: Sorting Collection objects inline with LINQ

    Ok, I think I figured it out, the solution is posted below, if anyone finds a better way please let me know. public void SortBySortOrder() { var fields = this.OrderBy(p => p.SortPhysicalOrder); int i = 0; foreach (Field field in fields) { Items[i] = field; i++; } } Basically I had to use a foreach loop to repoint all of the existing items in the collection to their corresponding sorted items manually. My testing also shows this is one of the few areas where LINQ is more efficient at doing something
  • Re: Get a value if a value exists in a List or String Array using LINQ

    alaa9jo solution would work, alternatively if you're on the 3.5 framework you could use this (borrowing from his example): string[] yourArray = { "A", "B", "C", "D", }; var foundString = yourArray.Where(p => p.ToLower().Contains("b"));
  • Sorting Collection objects inline with LINQ

    Hi All, I've been trying to resort a collection that inherits from Collection<T> by adding the following methods: public class FieldCollectionNew : Collection<Field> { // Best I can get to work currently public IEnumerable<Field> SortBySortOrder() { return this.OrderBy(p => p.SortPhysicalOrder); } //Closer to what I want (but doesn't work - no return) public void SortBySortOrder() { this.OrderBy(p => p.SortPhysicalOrder); } } Note the Field class contains many properties
  • Re: Help with ASP.NET "Session Timeout" Problem

    Hi Markjkwon, "2.a. How do I see timers being enabled/disabled at the client, network or server side?" Unfortunately the timers themselves are not openly exposed to us, they are managed by the servers themselves. We can only deduce whether or not the timer is getting reset through trial and error or by understanding what requests are being sent to your server. "- 2.b. Why does .NET allow for multiple timers such as this? Is there a way to have IIS/.NET help keep this under control
    Posted to Architecture (Forum) by Snowst on 8/8/2009
  • Could not load file or assembly 'System.Web.Extensions, Version=1.0.61025.0

    Hello, This problem has been driving my crazy for more than 6 months where I've had to literally copy dlls to directories just to be able to debug my projects. I am running the following version of VS: Microsoft Visual Studio 2008 Version 9.0.30729.1 SP Microsoft .NET Framework Version 3.5 SP1 Installed Edition: Professional The problem is there is absolutely no reason why this project should be attempting to load this dll, as there are no references to it in the following files (1-3 being the
    Posted to Visual Studio 2008 (Forum) by Snowst on 3/25/2009
Page 1 of 18 (179 items) 1 2 3 4 5 Next > ... Last ยป