@bobnoordam

Month: February 2020

Maintaining vertical scroll position on an ASP.NET GridView across postbacks

Our mission Here is what we want to archieve with a standard ASP.NET gridview; We want scroll bars to scroll vertical in a potential long list When a row is selected in the gridview, we want to maintain the scroll position in gridview. (de default behaviour would be for the grid to jump back up […]

Monitoring the file system for changes

This code sample sets up a handler to monitor the c:\ disk for changes in any file’s size, and report those changes to the console. Imports System.IO Module Module1 ”’ <summary> ”’ Display the change events detected by the file system watcher on the console ”’ </summary> ”’ <param name=”sender”></param> ”’ <param name=”e”></param> ”’ <remarks></remarks> […]

Raising an event on a usercontrol, and subscribing to it from an ASPX page

This is a minimalistic demonstration on hooking into an event risen by a usercontrol. The main page subscribes to the event on the user control, and once the usercontrol raises a postback the event data is retrieved. User control code using System; using System.Collections.Generic; using System.Linq; using System.Web; using System.Web.UI; using System.Web.UI.WebControls; namespace UsercontrolEvents { […]

Collecting performance data from local and remote systems using C#

Performance data Perfmon is a well known tool to monitor performance data for your local and remote systems. This code snippet gives you a worker class that can be used to connect to local or remote perfmon / system performance data, and provide the resulting information stream to your c# application. Local and remote To […]

Enumerating available performance counters on local and remote systems using C#

Performance counters Perfmon, the well known tool for monitoring performance counters has a nice list of categories and counters for your system. But what if you want to access a counter from code ? Or even worse, want to check if a certain counter is available or not ? In the previous document Collecting performance […]

Next Page » « Previous Page