Newbie question (.aspx script vs .vb code-behind)

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

Can someone explain what is the difference (pros and cons) between writing script in the .aspx page and code in the .vb page. Thank's.
 
use the vb code behind method, if you want your aspx pages to be code free.
it is useful when other people that are not programmers, need to design
the page manually, or with an html editor.
other than that, i see no difference.


Frank said:
Can someone explain what is the difference (pros and cons) between writing
script in the .aspx page and code in the .vb page. Thank's.
 
Hi Frank
Putting as much functionality as possible into the codebehind classes
and most of the presentation in the aspx-code simply makes the code
more readable. It also makes it possible for other aspx pages to
inherit functionality put into codebehind.

Mixed html and programming is also very confusing reading and
therefore makes the maintainance of your application harder.

There aren't any real differences between the aspx pages and your
codebehind classes besides those already mentioned. The aspx-page and
code-behind code are both compiled. The aspx file is compiled the
first time it's requested by a client and the codebehind is compiled
prior to deployment.

/Hugo
 
Back
Top