Solved

runat=server tag in html

Posted on 2010-09-14
2
401 Views
Last Modified: 2012-05-10
Does adding the id and runt=server tag, increase load time or affect performance in any way?
for eg if i create an element as:
<div id="mydiv" runat="server">
vs
<div class="mydiv">

affect load time or page size in any way. any suggestions would b great.


0
Comment
Question by:TrialUser
2 Comments
 
LVL 52

Accepted Solution

by:
Carl Tawn earned 250 total points
ID: 33673080
It shouldn't affect page size directly. Load time will take a minor hit because the parser will create a server-side object to represent the element rather than simply copyingt the markup to the output stream.

However, the hit will be negligible so shouldn't prevent you converting to a server-side element if you need to access it dynamicaly.
0
 
LVL 17

Assisted Solution

by:mreuring
mreuring earned 250 total points
ID: 33673082
I've seen very interesting articles on load time, most of which suggest that the performance of a backend-system is in most case negligible to what's happening during transmission and rendering of a page. So, runat="server" should not have a noticeable impact on performance at all. Removing the attribute will actually make your .net application fail (or it should, since this attribute indicates that the html-tag needs some attention from your backing bean, or whatever it's called on .Net :))

Anyways, client-side it will have 0 impact, it gets ignored.
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

It was really hard time for me to get the understanding of Delegates in C#. I went through many websites and articles but I found them very clumsy. After going through those sites, I noted down the points in a easy way so here I am sharing that unde…
This article discusses how to create an extensible mechanism for linked drop downs.
HTML5 has deprecated a few of the older ways of showing media as well as offering up a new way to create games and animations. Audio, video, and canvas are just a few of the adjustments made between XHTML and HTML5. As we learned in our last micr…
The viewer will learn the basics of jQuery including how to code hide show and toggles. Reference your jQuery libraries: (CODE) Include your new external js/jQuery file: (CODE) Write your first lines of code to setup your site for jQuery…

839 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question