If you have a web site already in production, but need to make a small coding fix to an .aspx page, instead of making the change in the code-behind file and then rebuilding and redeploying the entire project, you can make minor changes in the .aspx page code itself, writing the code as inline code. The workaround involves using the OnPreRender event (which is often unhandled) to inject new code into the page:
<script language ="visualbasic" runat ="server">
Protected Overrides Sub OnPreRender( _
ByVal e As System.EventArgs)
your code here
Note: This technique works only when you're not already handling the OnPreRender event in the code-behind file.
You'll find this technique very useful when you need to make small changes in production environments, because it takes effect immediately and doesn't require any application downtime.