<?xml version="1.0" encoding="UTF-8"?><!-- generator="WordPress/2.7" -->
<rss version="0.92">
<channel>
	<title>Code Monkey</title>
	<link>http://code.doroshenk.com/blog</link>
	<description>Dominating Code</description>
	<lastBuildDate>Tue, 29 Jul 2008 20:54:37 +0000</lastBuildDate>
	<docs>http://backend.userland.com/rss092</docs>
	<language>en</language>
	
	<item>
		<title>Problems with Multiple ListBoxes and SelectedIndexChanged</title>
		<description>I have a layout with master pages and at the top some ListBoxes that all have autopostback = true and corresponding SelectedIndexChanged events on them.

For some reason when one listbox changed all the events fired in a set order, I haven't figured out how to stop that from happening, basically ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/07/29/problems-with-multiple-listboxes-and-selectedindexchanged/</link>
			</item>
	<item>
		<title>How to speed up FireFox</title>
		<description>Found this on cnet and it makes firefox run even faster then before.  I highly recommend these with firefox 3.0 and you'll be zooming on the internet


Open firefox:

In a tab type about:config


right click in the pain and add new integer, type in ndlayout.initialpaint.delay and give it a value of 0


then ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/05/30/how-to-speed-up-firefox/</link>
			</item>
	<item>
		<title>Modifying a Select Box In Javascript</title>
		<description>When messing with pages using AJAX, its often necessary to change a select box's value.  Here is how to clear it's value.

var listBox = document.getElementById("listBox");
for (var i = listBox.options.length - 1; i &#62;= 0; i--)
{
listBox[i].parentNode.removeChild(listBox[i]);
}

Then to add items:

var item = document.createElement("option");
item.value = val;
item.text = txt;
listBox.appendChild(item); </description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/21/clearing-as-select-box-in-javascript/</link>
			</item>
	<item>
		<title>Detecting Ad Block Plus</title>
		<description>Ad blocking plus is great for browsing sites, but what if you want to actually be supported by ads and ad blocker is stealing all your page views.

Well the solutions is very easy.

on your site have javascript file lets call it script.js

in in that page just have one line:

AdsShowing = ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/19/detecting-ad-block-plus/</link>
			</item>
	<item>
		<title>Date Formats</title>
		<description>The nice thing about C# is its date format in the ToString() method.

so you have a date object with the value of February 9th, 2008 4:35:04 PM

dateObject.ToString("MM/dd/yyyy hh:mm:ss tt");

outputs 02/09/2008 04:35:04 PM;

24 hour clock use HH for hour:

dateObject.ToString("MM/dd/yyyy HH:mm:ss");

outputs 02/09/2008 16:35:04; </description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/18/date-formats/</link>
			</item>
	<item>
		<title>TSQL - Sorting with a Case Statement and Paging</title>
		<description>Typically when I use a stored procedure to return tabular data, I pass in a sort flag.  I have found the easiest way to do that sort is with a case statement.  I typically have the columns have a numeric value and pass that on click, where is what I get combined ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/06/tsql-sorting-with-a-case-statement-and-paging/</link>
			</item>
	<item>
		<title>Forcing Vertical Scroll Bars</title>
		<description>In developing centered pages I've noticed that if you go from one page to another and one page is longer then the screen and the other is shorter, the page jumps around and doesn't remain centered.  Why?  Because most browsers (IE being the exception) hide scroll bars if they aren't ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/04/forcing-vertical-scroll-bars/</link>
			</item>
	<item>
		<title>C# Switch Statement</title>
		<description>The syntax for a switch statement (Select Case in VB) is as follows

Inside each case you can use any jump statement you wish: including gotos and continues:

 http://msdn2.microsoft.com/en-us/library/d96yfwee(VS.71).aspx

switch (value)

{
     case "a":
          //dosomething
          break; //kicks out of the switch statement
     case "b":
          //dosomething else
          break;
      case "c":
          //dosomething again
          break;
      default;
          //do stuff
          ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/02/01/c-switch-statement/</link>
			</item>
	<item>
		<title>Populate a list box from an Enum</title>
		<description>Have you ever needed to populate a listbox from an Enum and have the numeric value of the enum be the value for the listbox?  Well here's how.

public enum Status
{
     Progress = 1,
     Modify = 2,
     Review = 3,
     Completed = 4,
     Terminated = 5
}

private void loadStatus()
{
     Array arr = ...</description>
		<link>http://code.doroshenk.com/blog/index.php/2008/01/23/populate-a-list-box-from-an-enum/</link>
			</item>
	<item>
		<title>Welcome</title>
		<description>Welecome to the new Code Monkey blog.  I plan on sticking code samples up here to help others and to help myself to code.  This will probably be javascript code and c#, since thats what I'll be working on. </description>
		<link>http://code.doroshenk.com/blog/index.php/2008/01/19/welcome/</link>
			</item>
</channel>
</rss>
