Solved

runat=server tag in html

Posted on 2010-09-14
2
396 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
Comment Utility
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
Comment Utility
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

Maximize Your Threat Intelligence Reporting

Reporting is one of the most important and least talked about aspects of a world-class threat intelligence program. Here’s how to do it right.

Join & Write a Comment

So you have coded your own WordPress plugin and now you want to allow users to upload images to a folder in the plugin folder rather than the default media location? Follow along and this article will show you how to do just that!
SASS allows you to treat your CSS code in a more OOP way. Let's have a look on how you can structure your code in order for it to be easily maintained and reused.
In this tutorial viewers will learn how to style different bullet points for unordered lists in CSS. Begin with a normal unordered list; the default bullet point is a solid circle: In the CSS, create a defined class of unordered list by typing "ul.S…
The viewer will learn how to create a basic form using some HTML5 and PHP for later processing. Set up your basic HTML file. Open your form tag and set the method and action attributes.: (CODE) Set up your first few inputs one for the name and …

771 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

Need Help in Real-Time?

Connect with top rated Experts

11 Experts available now in Live!

Get 1:1 Help Now