Skip to main content

Posts

Showing posts from February, 2011

File System Watcher

The Following is the example for File System Watcher. Create Console Application in Visual Studio. File --> New --> Project In the Template Select the Console Application. Eg: Namespaces Used : using System.Security.Permissions; using System.IO; These two namespaces used for file operation and file permissions. Code: using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Security.Permissions; using System.IO; namespace Watcher {     public class Watcher     {          public static void Main()         {             Run();         }         [ PermissionSet ( SecurityAction .Demand, Name = "FullTrust" )]         public static void Run()         {             // Create a new FileSystemWatcher and set its properties.             FileSystemWatcher watcher = new FileSystemWatcher ();             watcher.Path = @"D:\P

Microsoft Chart Controls - ASP.NET

Downloads: Click here to download Microsoft chart control add on.  Install the add on. Steps : Add Chart control in your VS tool box.   2. Create a New Web Application. 3. Drag and drop the chart control to design page. 4. The 3 major properties of the Chart is  Title,Series and Chart Area.     4.1. Title property is used to set the title of the chart.     Eg:      < Titles >       < asp : Title ShadowColor ="32, 0, 0, 0"                  Font ="Trebuchet MS, 14.25pt, style=Bold"                    ShadowOffset ="3" Text ="Sample 1"                    Alignment ="MiddleCenter" ForeColor ="White">       </ asp : Title >    </ Titles >  4.2. Series is collection of values to show in the chart.   Eg:      < Series >        < asp : Series Palette ="EarthTones"                 ChartArea ="MainChartArea"