The reason for codebehind files is to seperate the presenetation from the
logic. On a large project you may have some people designing the web pages
(aspx), and other people writing the code. Another lesson from old ASP is
that if you mix code and presentation in the same file, things get really
messy very fast. ASP and ASP.NET are very different so the mixing shoudln't
be as bad as old ASP.
Microsoft uses the same system in Avalon, the new presentation system in
Longhorn. The GUI is stored in XAML files, the code may be stored in
seperate files.
The choice of using seperate code files or emedding it with the presentation
is a matter of personal preference. If you like everything in one place, go
for it, if not, use codebehind files.
Chris
"Janderlen" <an*******@discussions.microsoft.com> wrote in message
news:D8**********************************@microsof t.com...
Hi,
Im start to learning c#.... My question is:
I have a webform1.aspx
¿What are the difference between write code c# inside the codebehind of
the page (webform1.aspx.cs), and write c# code inside the tab "html" page
like <script language=c#> (webform.aspx) ......?
Thanks a lot.
Janderlen