web controls are not instansiated???

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
 
V

Victor Garcia Aprea [MVP]

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
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,769
Messages
2,569,576
Members
45,054
Latest member
LucyCarper

Latest Threads

Top