ServerControl vs UserControl

I would like to hear some reasons for using ServerControl, the opposite of UserControl. I found that I was probably abusing UserControls.

My list looks something like this:

Pro usercontrol

  • Easy to modify. It is necessary to add a class attribute to an element, crack it in html.
  • Quick and easy creation of an initial presentation. Anyone can write plain html correctly?

Pro servercontrol

  • Performance. No html parsing.
  • Flexibility. Rendering control to a mosquito behind.
  • Reuse. Compile it and paste it into the GAC for later use. Or, sell it.

Anything I miss?

+3
source share
4 answers

:

  • ( , )
  • ( ..)
  • (, , .browsers)
  • ( , , )

, :

+5
+3

, . , , .

+2

. html-

, . , .ascx . , , , .

+1

Source: https://habr.com/ru/post/1715752/


All Articles