October 2005 Entries

SetRefresh Method for ASP.NET web pages to support postback.

I've read Willem's Blog post Auto-refreshing ASP.NET web pages and desided to post my helper function SetRefresh(Page page,int nDelaySec) that is similar to suggested by Willem's third method, but supports postbacks. It's important to keep values, entered by the user before refresh. public static void SetRefresh(Page page,int nDelaySec) { // from http://groups.google.com/gr... //NOTE: Often the __doPostBack function is inserted ......

Support Forms and Windows authentication on the same ASP.NET Application.

I 've posted some details of my implementation of Richard Dudley's solution How to Make Windows Authentication and Forms Authentication Work Together. Please see them here ......

WinForms ComboBox SelectedIndexChanged event and SelectedValue assignment.

I am using WinForms.ComboBox and wanted to handle SelectedIndexChanged events. I found that when DataSource is assigned adding each row caused SelectedIndexChanged. It is a known and aknowledged by Microsoft problem and there are possible workarounds(e.g see http://www.bobpowell.net/Co... or http://www.windowsitpro.com... ). I desided that I don't need to set DataSource but will use lst.Items.Clear(); lst.Items.AddRange(coln.ToA... It helped with SelectedIndexChanged ......

Storing User Configurations in .Net 1.1

.Net 2.0 will introduce My.Settings to store user preferences. For .Net 1.1 i wanted to use approach described by Rockford Lhotka in MSDN article “Storing User Configurations”. It requires to create derived class with properties that you want to store. I found 2 tips when created the derived class that is using IsolatedStorage. 1. Ignore FileNotFoundException error when load storage the first time.2. Use assignment with cast when Load class from storage, e.g. MySettings=MySettings.Load(); ......

ADO RecordSet.Status value after AddNew is not adRecNew

In ADO I wanted to test if the current record existing or has been added with AddNew. I 've checked RecordSet.Status value and expected that after AddNew command the Status will be adRecNew(1) but it returned adRecOK(0). Possibly the value depends on cursor settings , in my code I had adOpenKeyset, adLockOptimistic. Fortunately I found that I can use EditMode and check if value is adEditAdd (2) ......

DotNetNuke "Custom groups" -aka "Security Roles" documentation

I've started to read DotNetNuke documentation. The Guided Tour page refers "For more information on custom groups you'll want to read the tutorial: Manage Users." However the link doesn't described custom groups. To find more about “Security Roles“ you should read DotNetNukeOnlineHelp ......

Helper methods for running Access generated reports from ASP.NET

I am using Access reports exported as xml/xsl and show them in ASP.NET as it is described in Access: Your New .NET Report Writer by Danny J. Lesandrini. There are a few methods then can be useful for others who want to use the same technicque. Note that the original article uses DataSetName = "dataRoot" which causes problems for generated xsl files, because XML is case-sensitive and MS access generate XML with “dataroot“ element-all low case. 'TODO create COM wrapper and use early binding ......

Configuration class for Session Data Management Tool

I've posted a code of Configuration class for Session Data Management Tool created by Xiangyang Liu to store data between different threads in ASP.NET asyncronous application. The source code of the tool has SessionService web site where configuration is done in global.asax. To make it easier to incorporate it into existing ASP.Net web application, it was moved to a separate class. The changes also were done to store trace and data folders in Temp directory, which is easier for deployment ......

«October»
SunMonTueWedThuFriSat
2526272829301
2345678
9101112131415
16171819202122
23242526272829
303112345