Search

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

Matching Posts

  • Re: SerializableDictionary

    SDictionary In my previous post should read: SerializableDictionary
    Posted to Tips & Tricks (Forum) by george.polevoy on 3/3/2006
  • SerializableDictionary

    using System; using System.Collections.Generic; using System.Runtime.Serialization; // DESCRIPTION: Simple workaround for a lack of serialization capability in IDictionary objects // Before: Dictionary<string, string> d; d["key"] = "value"; // After: SDictionary<string, string> d; d.target["key"] = "value"; // Dictionary is converted to a List of key value paris prior to serialization. // NOTES: A ~100% memory usage overhead is due to storing the dictionary in a temporary generic collection
    Posted to Tips & Tricks (Forum) by george.polevoy on 3/3/2006
  • Re: Dataset + ObjectDatasource + GridView + ASP.NET 2

    Say you have a table: (client_id /*primary key guid*/, [client_name, ...] ) I've got an auto-generated DataSet and a GridView updatable in two steps: 1. Select the ObjectDataSource in the designer. Press F4 to display Properties floater if it's not already displayed. Find the UpdateParameters (Collection) ... property, enter the "..." button to open the "Parameter Collection Editor", select the primary key column, ("client_id" in my case). Click the "Show advanced properties" link button (yet can
  • Re: RoleView - role based page content

    Example usage Don't forget to register tag prefix on the page for the code to work <%@ Register TagPrefix="variatron" Namespace="Variatron" %> Example 1 <variatron:RoleView ID="RoleView_Registered" runat="server" RoleFilter="*"> If you registered, you should see this </variatron:RoleView> <variatron:RoleView ID="RoleView_Managers" runat="server" RoleFilter="manager"> This is for managers<br /> </variatron:RoleView> <variatron:RoleView ID="RoleView_Staff" runat
    Posted to Tips & Tricks (Forum) by george.polevoy on 2/12/2006
  • NonRepostable. Truly prevent form from being reposted. Just place this control on the page

    using System; using System.Web.UI.WebControls; using System.Security.Cryptography; using System.Text; namespace Variatron { public class NonRepostable : HiddenField { protected static string MD5Hash(string ToEncrypt) { MD5CryptoServiceProvider md5 = new MD5CryptoServiceProvider(); byte[] hashedbytes; UTF8Encoding textencoder = new UTF8Encoding(); hashedbytes = md5.ComputeHash(textencoder.GetBytes(ToEncrypt)); md5.Clear(); md5 = null; return Convert.ToBase64String(hashedbytes); } private string ticket_variable_key
    Posted to Tips & Tricks (Forum) by george.polevoy on 2/11/2006
  • RoleView - role based page content

    /* * RoleView control for use with Role feature * Don't forget to register tag prefix on the page for the code to work Example 1 If you registered, you should see this This is for managers This is for employees Something all users can see By the way, you can register... Example 2 User my personal data new users:  register */ using System.Web.UI.WebControls; using System; using System.Collections; using System.Web.Security; namespace Variatron { public class RoleView : Panel { private string
    Posted to Tips & Tricks (Forum) by george.polevoy on 2/11/2006
Page 1 of 1 (6 items)