Showing related tags and posts accross the entire site.
-
Here's some code to set a cache variable in the global.asax. http://www.developer.com/net/net/article.php/1477771 static Cache _cache = null; protected void Application_Start(object sender, EventArgs e) { _cache = Context.Cache; _cache.Insert("UserCount", BusinessObjects.ActiveUserCounter...
-
Here's a custom class that works with the asp.net profileprovider that will return the number of active users for an application. It is a static class that will only make 1 database call based on the last time interval. public static class ActiveUserCounter { private static DateTime LastTime = Convert...
-
Here are better SetPropertyValues and SetProfileData methods that only make 1 database call by buildinding a single sql statement to execute instead of executing a statement for each property. public override void SetPropertyValues(SettingsContext context, SettingsPropertyValueCollection collection)...
-
Apparently the profile provider only works with asp.net websites and not asp.net web application projects in visual studio. Here's an article explaining why... http://webproject.scottgu.com/CSharp/Migration2/Migration2.aspx Appendix 2: Migrating Code that works with the ASP.NET 2.0 Profile Object...
-
Code Behind protected void bindRepeater() { rptDays.DataSource = ResultsWrapper.Dates; rptDays.DataBind(); } protected void rptDays_ItemDataBound(object sender, RepeaterItemEventArgs e) { DateTime date = Convert.ToDateTime(e.Item.DataItem); LinkButton btnDateHeader = e.Item.FindControl("btnDateHeader"...