HTML flexibility in ASP.NET

Hello all,

I have heard that you can not fully control your pages with HTML in ASP.NET as in PHP. Is that right? Please give details.

Regards,

Dreamer

Yes, that is true. But I was more thinking of a newbie just starting out, as they might/probably will not find that and will not realise the ID to be a problem straight off the bat. And they may also not be using .net 4.

But yes, that is a very good point. Glad you mentioned it.

Thank you all, so do you mean that ASP.NET provides flexibility in editing HTML markup like PHP?

And you can get pretty darned near complete control in webforms if you need it . . .

Well, if you know what you doing and/or using MVC. Then yes, you can fully control the HTML.

The only thing about asp.net is the renames all the id and name tags on a page to make sure they are all unique. But only on controls that is set to runat=“server”

If you want full control over html, i would suggest MVC. As the asp.net controls for web apps generate their own html and you will need to know what you are doing to control it/use the correct control

With ASP.NET 4.0 Web Forms, we now have control over how the id is generated:

Yes, it does. And webforms lets you place all you code in a seperate file.

HTML - default.aspx
Code - default.aspx.cs

So it keeps things seperate and easier to read