Getting the control that posted back to asp.net application

Need to know which specific control posted back to your page? (Original article at http://geekswithblogs.net/mahesh/archive/2006/06/27/83264.aspx) /// <summary> /// Tells us which control posted back /// </summary> /// <returns></returns> public Control getPostBackControlName() { Control control = null; //first we will check…

Muting audio channels using Mixer Control API

I recently had a problem on a job where no matter what we did, we could not control the left/right balance programmatically on two specific PC’s. We tried using various methods: Windows Media player API DirectSound APi WinMM.dll Praying None…

URL Rewriting in Asp.net using URLRewriter

One way to get yourselves rated better in the search engines is to get rid of the basic aspx page and replace it with something much more descriptive so this article goes on how to use URLrewriting in your project.

Add META keywords and Description in ASP.NET (DigitalColony.com)

Add META keywords and Description in ASP.NET Here is the syntax for programmatically adding META tags to an ASP.NET 2.0 page. HtmlMeta metaDesc = new HtmlMeta(); metaDesc.Name = “description”; metaDesc.Content = “Tips on roasting coffee at home”; Page.Header.Controls.Add(metaDesc); HtmlMeta metaKey…

How to programmatically turn on the Numlock Key

The following code will allow you to turn on the numlock key upon startup. Can’t credit anyone as i’m not sure where it came from but it does work 100% using System; using System.Runtime.InteropServices; class SetNumlockKeyOn { [StructLayout(LayoutKind.Sequential)] public struct…

Deleting elements from XML Documents

If you need to delete either a Node, Element or Attribute from your XML document, try the following code as it actually works!!! XML Document Structure <?xml version=“1.0” encoding=“utf-8” standalone=“yes“?> <!–XML Config file–> <Tests> <Test> <ID>47d272cd-877d-4d0f-ad4a-cfa31200d966</ID> <Object>Obj1</Object> <TestType>Fail Yes</TestType> <Command>fail…