Wednesday, January 20, 2010

Is it easy to control HTML/CSS code when using ASP.NET?

I want to learn to use ASP.NET for web sites. I've done some Java, and some lame PHP stuff (a page that filled a table from a DB) and some static HTML/CSS newbie sites.





I like the ability to exercise complete control on my HTML/CSS code so that it not only remains standard compliant, but also so that it stays lightweight and that I can understand every line in it and that it stays readable to me.





With PHP, it was easy to do so since I would use a text editor, write the HTML code and drop some PHP here and there.





With ASP.NET (3.5), if I use some of it's productivity features such as web controls (which I still know nothing about), will I still be able to easily control my HTML output so it contains only readable stuff? I'm just worried about my pages becoming heavy and looking like Frontpage '97 code..





Please do not just tell me about web controls. I know little about ASP.NET so I assume I will use other stuff as well. I mentioned web controls only because I don't really know what I'm talking about yet.Is it easy to control HTML/CSS code when using ASP.NET?
Prepare yourself for a shock, losing control was the main thing that I found hard to confront when I first attacked ASP.NET.





Of course, there is no reason why you can't generate all your own html/css/javascript but that's not the .NET way.





My advice is to take advantage of the existing controls and where they do not perform as you require then derive your own control Class from them or write another from scratch. If, like me, you habitually View Source then you are going to see a mess. You might be able to tidy things up a bit by implementing Delegates to do the rendering for you.




















_

No comments:

Post a Comment