Solved

runat=server tag in html

Posted on 2010-09-14
2
397 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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

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

This is a PowerShell web interface I use to manage some task as a network administrator. Clicking an action button on the left frame will display a form in the middle frame to input some data in textboxes, process this data in PowerShell and display…
Use these top 10 tips to master the art of email signature design. Create an email signature design that will easily wow recipients, promote your brand and highlight your professionalism.
In this tutorial viewers will learn how to style rounded corners for elements in CSS using the border-radius property Begin with a normal styled element such as a div: To style all four corners of the div to be the same degree of roundness, use the …
The viewer will the learn the benefit of plain text editors and code an HTML5 based template for use in further tutorials.

895 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

14 Experts available now in Live!

Get 1:1 Help Now