You can wrap your code in [code] tags so that it's more readable.

Show your new code, I'm assuming it has changed since the previous post. And you'd put it in your codebehind at the point at which you want it to execute - it could be on page load or a button click.