CodeGuru Home VC++ / MFC / C++ .NET / C# Visual Basic VB Forums Developer.com
Results 1 to 5 of 5
  1. #1
    Join Date
    Jun 2005
    Posts
    8

    Which is faster ASP.Net server controls or classic ASP HTML controls?

    Hi frnds,

    I am a newbie in ASP.Net..

    I just want to know the reason Why it is said thath ASP.Net server controls are more faster than HTML server controls?

    Let me make you clear abt my doubt with a simple example. Say we need to change the caption(text) of a button or change the text in a textbox in runtime in an ASP.Net page.

    In classic ASP we can achieve this with very simple and fastest javascript statements.

    But in the case of ASP.Net controls, since all of them hav that "runat=server" tag,the code execution happens in the server side. So almost all the ASP.Net server controls by default initiates a server round trip(postback).

    ASP.net controls always needs a postback to do its intended function. The same can be achieved thru clientside script?..cant we avoid this unnecessary roundtip?..

    Postbacks or Server Roundtrips always have a bad effect on a site rt??...Its actually a last choice to be done

    What i felt is that..the ASP.Net helps speedup the coding process for the programmer, as it is eazy to code the server events than in classic ASP. But rest everywhere i felt, classic ASP (HTML) controls are faster. I dont kno whtr i m correct or not. But what i felt is ASP.Net server controls always initiates a server roundtrip which is not the case with HTML controls..

    But then how come it is said that ASP.NEt server controls are much faster than classic ASP HTMl controls?... what ever features it says(like caching or just in time compilation..etc etc..).. will those be fast as equalent to a client side script??

    I am actually going to start a new project of porting a classic ASP project to ASP.Net. But im in a confusion of which control to be used..

    Please let me have 3 or more views abt this basic qstn..

    Thanks in advance

    Sunil

  2. #2
    Join Date
    Apr 2005
    Posts
    576

    Re: Which is faster ASP.Net server controls or classic ASP HTML controls?

    I have not done any ASP.Net but a lot of ASP a few years ago, I hope someone else can fill in the details here, but I think that the ASP.Net server controls are quite smart and the code they generate for the browser minimizes the number of postbacks.

  3. #3
    Join Date
    Feb 2001
    Location
    Stamford CT USA
    Posts
    2,167

    Re: Which is faster ASP.Net server controls or classic ASP HTML controls?

    Before we go on, I just wanna remind you that ASP.NET is a server side technology. The output from ASP.NET is still HTML tags/elements and thefore interpreted by browsers as it is w/ other server side software. And browsers still post the same type of data structure back to the webserver irrespective of back-end technology.

    So, you can still use client script to make changes to the html elements on the client side because they are the same as before ASP.NET came along.

    In ASP.NET case, the names of the controls are a little bit wierd but you can still get them via DOM as usual from client script.

    There is no requirement put forth by ASP.NET that you must POSTBACK in order to do everything. You postback only if you need to get the server to process the data as it was w/ ASP.

    ASP.NET is way faster because of few things.

    First of all, you're plugging into the core FRAMEWORK (the same FW that you would be using if you were developing Windows App.).

    It is now compiled instead of intepreted and we know that is definitely a benefit.

    ASP.NET implements OOP which allows you to design a more efficient logic. Again, a plus.

    The only thing that is arguable is the fact that all server controls requires object instantiation in order for the control to be rendered. This is a little overhead but w/ the more powerful servers available nowadays, this evens out.

    My two cents,
    Good Luck,
    -Cool Bizs

  4. #4
    Join Date
    Feb 2005
    Location
    Denmark
    Posts
    742

    Re: Which is faster ASP.Net server controls or classic ASP HTML controls?

    Many of the things you'd do client side in "ordinary" ASP can still be done client side in ASP.Net.

  5. #5
    Join Date
    May 2005
    Posts
    195

    Re: Which is faster ASP.Net server controls or classic ASP HTML controls?

    Quote Originally Posted by Alsvha
    Many of the things you'd do client side in "ordinary" ASP can still be done client side in ASP.Net.
    I have to agree 100%, after converting a VB6 windows app to ASP.net, and keeping most of its functionality, using javascript was the key, and keeping everyting ( as much as possible ) on the client was a must.

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

Featured