How to post a page using C#

If you should ever desire to do some webrequesting and posting some values to a webpage and afterwards reading the results. Then you can use the following snippet   using System; using System.Collections.Generic; using System.Linq; using System.Text; using System.Net; using System.IO; namespace PageScraper { class Program { static void Main(string[] args) ... [More]

Find control

In order to find a control on a page, which my be nested in a repeater or another control, this method might be useful private Control FindNestedControl(Control parent, string controlid) { Control c = parent.FindControl(controlid); if (c != null) return c; else { foreach (Control child in parent.Controls) { c = FindNestedControl(child, ... [More]

Execute global.asax methods always

In order to execute your methods in your global.asax file you need to modify your IIS configuration.  This is because .htm files are handled by the IIS without activating the .NET framework. In order to activate the framework when requesting other file types you should Open the IIS manager Navigate to your website Rightclick and select properties Select the "Home directo... [More]