I have been doing templates for a guy who is coding the back end of a data provider system.
When he returned the product it appeared like he had ignored my templates, and the HTML structure I had provided.
Now his reply to me was that this was the best he could do.
Concerning ID’s on html elements they all have asp control tags on like so ctl00_ContentPlaceHolder1_listP
Also he was outputting my structures span tags like this <span2> <span3> etc, he was saying this was just the way asp was outputting nested tags.
Now I do not believe this guy for a second, if asp can not out put semantic HTML it would not be around today.
Can anyone provide me with any idea of what this guy is up to?
… I’m afraid he isn’t too far from the truth. ASP.NET WebForms does mangle IDs be default, and some of the HTML it outputs is… awful. The ID issue is sorted with .NET 4, but thats not out for a few months. He can checkout out the CSS Control Adapters (http://www.asp.net/CssAdapters/) which will help sort the issue.
As for the poor Html, you can avoid this by using the RAD targeted controls less but it takes a little more work and time. So he is being lazy about this
This is all mainly a WebForms issue, the new ASP.NET MVC puts you must closer to the metal and gives 100% control of the UI, but you lose the RAD targeted tools
Thanks for that, you can not understand how much I hate this guy.
I was almost considering getting him to output a web service that I could consume with PHP and format exactly how I want it. going to have some stern words with him.
If you know what you are doing with asp.net, you can output anything you want. You need to know what controls output what code.
Lables for eg. Output as spans, but Literels work the same as lables, but without the span.
Repeaters run like data loops in PHP. And they add non of their own html.
The ID’s however is a problem. But an easy way to get around this is target classes and not ids in your CSS.
I have never seen asp.net output span1, span2, etc
I work very closely with designers. They do all the layout with classes only and I make the asp.net output the exact code they want. Without any CssAdaptors.
Just my 2c on this.
Are Microsoft considering this issue with IDs, it really means web apps will run slower if you have to navigate through classes instead of IDs
Yes, in ASP.NET 4.0 they have give the developers more options when it comes to client ids. See ClientIDMode in ASP.NET 4.0 for more information.