Results 1 to 8 of 8

Thread: [Resolved] <% %> vs <script runat=server>

Threaded View

  1. #1

    Thread Starter
    Fanatic Member invitro's Avatar
    Join Date
    Jan 2000
    Location
    Outside your window
    Posts
    547

    Resolved [Resolved] <% %> vs <script runat=server>

    I finally decided to migrate from ASP to .NET, so you will see me here quite often.

    Anyway, what I'm trying to understand is the difference between the
    <% %> tags vs <script runat=server>

    It seems like both methods work identical. Furthermore, when I create a function in <script> tags I can then access it in the <% %>

    What is the difference? Which one should I be using?

    Thank you!

    ------------------

    After doing a few google searches i found this at
    velocityreviews.com/forums

    Craig Deelsnyder

    Posts: n/a

    Default Re: <script language="vb" runat=server> versus <% %>
    [email protected] wrote:

    > Pardon the newbie question...
    >
    > What's the difference between (asp.net)VB code inside one versus the
    > other. And why have both?

    There is no difference, assuming your app's default language (set in the
    page or web.config) is set to VB. The second one is shorthand for the
    first, it'll assume the default language of your app (or page)....I
    recommend using the former though for clarity as the latter was more of
    an ASP legacy notation, which I don't know if it's frowned upon using
    now....

    --
    Craig Deelsnyder
    Microsoft MVP - ASP/ASP.NET
    Last edited by invitro; Jul 8th, 2006 at 03:59 PM. Reason: Spelling, format, and a resolution yay!
    ok, so... windows takes 1 minute to search for a file on my PC yet google.com takes 1 second to search the entire internet?

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width