Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > ASP .Net > what is the difference between code inside a <script> tag and code in the code-behind file?

Reply
Thread Tools

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

 
 
keithb
Guest
Posts: n/a
 
      03-29-2006
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


 
Reply With Quote
 
 
 
 
Bruce Barker
Guest
Posts: n/a
 
      03-29-2006
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)




"keithb" <> wrote in message
news:%...
> 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
>
>



 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Extra space between form tag and table tag when screen resolution is 1280 x 1024 nikkilou@nycap.rr.com HTML 2 07-24-2007 11:29 PM
how do u invoke Tag b's Tag Handler from within Tag a's tag Handler? shruds Java 1 01-27-2006 03:00 AM
what's the difference, URL in FORM tag and in INPUT tag john woo Javascript 1 06-29-2005 03:40 PM
Difference between bin and obj directories and difference between project references and dll references jakk ASP .Net 4 03-22-2005 09:23 PM
What's the difference/advantages between code behind and code inside? Alan Silver ASP .Net 37 02-10-2005 03:11 PM



Advertisments