I’ve been a PHP developer for 10 years, trying to broaden my horizon I am doing a project in ASP.NET. What is the advantage to using an
over usi
What is the advantage to using an over using a standard
?
runat="server"
inside the controlComparative Summary
Next when I dynamiclly add inputs (via javascript) I can’t use TextBox’s I need to use
.
Whether your using ASP.NET or Javascript, dynamically added controls gets very messy. It's much easier to hide/show controls when needed (or use repeaters or datagrids).
Finally wouldn’t it be faster to render the normal input? If I code with , that has to be rendered where if I use it simply needs to be displayed.
I don't think it's fair to compare the speed of ASP.NET to HTML/Javascript applications. ASP.NET was meant to render ASP.NET controls, and using HTML controls inside an ASP.NET isn't going to have any noticeable performance gains.
ASP.NET vs HTML/Javascript
I feel like your question essentially amounts to "Why not use a brick on a nail, rather than a hammer?" ASP.NET is a framework, and was built with ASP.NET controls in mind. It's purpose is to allow things to be programmed faster, easier while abstracting away most things (usually trivial, repetitive ones) that would normally be done with Javascript.