.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Home >> Forum >> ASP.Net >> Post New QuestionBookmark and Share Subscribe to Forum

Why we use runat="server"

Posted By: Aamrapali Tamgadge     Posted Date: November 03, 2011    Points:5   Category :ASP.Net
Hi Friends My Question is that why we use runat="server" in asp.net what is the role of it.

Author: Cheta             
Posted Date: November 03, 2011     Points: 20   


I understand your point, but the importance of [runat="server"] is more for consistancy and extensibility. If the developer has to mark some tags some ways (ie an "asp:" prefix) and in other cases using runat, then it creates more confusion. Also, this simplifies what is sent directly to the user agent as a Response.Write and what needs to be parsed by the ASP.NET engine. What if some user agent of the future has a name collision with one of the ASP.NET tags, it would be difficult otherwise to tell ASP.NET to ignore a tag.

Author: Akhil Raj       [Moderator]      
Posted Date: November 04, 2011     Points: 20   

Please read the following forums


Author: Maverick             
Posted Date: November 18, 2011     Points: 20   


You cannot access your control on server side until runat = server is not specified


Post Reply

You must Sign In To post reply
Find more Forum Questions on C#, ASP.Net, Vb.Net, SQL Server and more Here
Quick Links For Forum Categories:
ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  OOPs  SilverlightIISJQuery

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend