web controls are not instansiated???

  • Thread starter Thread starter al
  • Start date Start date
A

al

Greetings,

I have noticed that when a web control(server ones)is placed on a
page, that control is not instansiated, only declared? does this have
to deal the way web pages work (instansiated every round trip)??

MTIA,
Grawsha
 
Hi Grawsha,

What you're seeing is by-design. The code that actually instantiates a
control will be generated on-the-fly by the page parser. The page parser
will create a new class that derives from your class (if you're using
codebehind) or from System.Web.UI.Page if you're not using codebehind. You
can read some more info about this and how it will be changed for the next
version of ASP.NET here[1]

[1]
http://weblogs.asp.net/vga/archive/2003/10/28/CodeBehindVsCodeInline.aspx

--
Victor Garcia Aprea
Microsoft MVP | ASP.NET
Looking for insights on ASP.NET? Read my blog:
http://obies.com/vga/blog.aspx

To contact me remove 'NOSPAM'. Please post all questions to the newsgroup
 
Back
Top