• Serving other content in ASP.Net Response

    You want to generate a file or serve a document other than HTML out of ASP.Net and want to give it all the correct headers and filename in the response? It requires only a few lines to get it done.

  • Perform Javascript from codebehind with RegisterStartupScript

    A piece of javascript can be formed within codebehind and registered to run after the page has loaded.

  • 404 pages in ASP.Net websites

    Creating a 404 page for an ASP.Net website isn’t hard. But it depends on when you want it to be showed and how it should be showed. I’ll explain the quick and simple way.

  • Execute code for a page after Master Page is loaded

    Sometimes you’d like to edit a public property or call a function of a Master Page from the currently requested page.

  • ASP.Net Gridview to Excel

    It’s easy to do this. Or at least, you’d think it is. But when you allow the columns to be generated automatically, you can run into a nasty error “The controls collection cannot be modified because the control contains code blocks <% ... %>”