To configure elmah on iis7, read this post first: http://code.google.com/p/elmah/wiki/DotNetSlackersArticle If setting does not work… copy and paste these lines in right place <system.web> <httpHandlers> <add verb=”POST,GET,HEAD” path=”elmah.axd” type=”Elmah.ErrorLogPageFactory, Elmah” /> </httpHandlers> <httpModules> <add name=”ErrorLog” type=”Elmah.ErrorLogModule, Elmah”/> <add name=”ErrorMail” type=”Elmah.ErrorMailModule, Elmah” /> <add name=”ErrorFilter” type=”Elmah.ErrorFilterModule, Elmah” /> </httpModules> </system.web> <system.webServer> <modules runAllManagedModulesForAllRequests=”true”> <add name=”ErrorLog” type=”Elmah.ErrorLogModule, [...]
Archive for August, 2011
6 Aug
Looping through all control in one page
This code will help you to loop through all control and child control in one page. To call the Following function you can use something like SetTextBoxBackColor(this.Page,Color.Yellow) in your code behind. private void SetTextBoxBackColor(Control Page, Color clr) { foreach (Control ctrl in Page.Controls) { if (ctrl is TextBox) { ((TextBox)(ctrl)).BackColor = clr; } else { [...]