if (IsPostBack) return;(mikeinmadison.wordpress.com)
submitted by
mikeinmadison(170) 3 years, 8 months ago
I began using a single-line postback check a while ago, and I think it’s better than using the usual block multi-line style. There are probably quite a few varying opinions about this, but my reasons for using the single-line (top) version include:
1. It’s easier to type and more readable
2. There is no reverse logic
3. It saves a line or two of code
4. It’s easier to comment out for debugging
5. The “Bunch of code” isn’t needlessly tabbed in
|category: ASP.NET
|Views: 24
tags:
ASP.NET another
Everyones tags:
Your Tags: