Forgive me if this is a slight mis-use of the system, but I'd like fellow StackOverflow users to settle a debate a colleague and I are having.
As a general rule, I prefer each separate item of functionality to be encapsulated within a UserControl even if I know it's only going to be used once.
My colleage will eschew creating a UserControl in this circumstance and use a WebForm, arguing that if it's only going to be used once, what's the point of creating a UserControl - it just adds an additional, unnecessary overhead.
I argue that the additional overhead is negligible and it makes for better-organised code, and who knows, you may re-use the functionality at some point in the future.
So who's right?
Edit
It looks like I may get quite a few responses - my colleague and I have agreed that we'll count up the replies in a day and award the correct answer to whichever argument gets the most votes.
Further edit
Looks like I'm the winner :D
I've ignored posts that suggest we're both right, and counted an answer in support of each side as +1, and each up-vote on that answer as a +1 too. I win 11-6.
If it makes the code better organized, I'll always try to create separate user controls.
This really makes communication easier to follow. Think SRP.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With