what is the difference between code inside a <script> tag and code in the code-behind file?

  • Thread starter Thread starter keithb
  • Start date Start date
K

keithb

What is the difference between code that exists inside the <html><script
runat="server" > tag and code that exists in a code-behind file?

Thanks,

Keith
 
in 1.1 the aspx file generates a class file that inherits from the
codebehind (if one). code defined in <script> blocks belong to that class,
and follows the scoping rules of inheritance (such as won't see private
variables defined in the base class)

in 2.0 the aspx file and the codebehind are both partial source files of the
same class, so there is no difference (except where typed).

-- bruce (sqlwork.com)
 
Back
Top