is html coding (almost) obsolute with .Net?

D

David

jumping on the train and with such a big jump that .Net is there is
something I just find hard to believe... since the arrival of Web forms
(<asp:xxx/>) - will I ever need to do manual HTML code except for the actual
graphical design of my web (e.g. <p> <br> <table>) ???
 
G

Guadala Harry

Welcome to the party.

HTML coding is definitely NOT obsolete with ASP.NET. I can only speak for
myself, but the only HTML work I do is to create the layout of aspx pages,
custom page templates, and control templates. The DataList Web Server
control is an example of a control for which you (can) define raw HTML
templates. Even with these server-side controls that can inject lots of HTML
into the rendered page for you - you will sometimes have to provide it with
an HTML template in order to get the look you want.

Separately, don't throw away your favorite HTML editor. VS.NET 2003 is
notorious for trashing your clean HTML. That is, if you create a nice clean
HTML page layout in Notepad or DreamWeaver, and then open that page in
Visual Studio, odds are pretty good that your clean HTML will be destroyed
as VS.NET 2003 does a complete rewrite for you. And it's not simply
recreating your original layout with different HTML; you get a completely
new layout as well. The good news here is that the next version of Visual
Studion is supposedly going to solve this problem. Until then, many of us
use Dreamweaver in conjunction with VS.NET 2003 - using DW for all HTML/page
layout work and site management tasks (uploading files, etc), and switch
over to VS.NET for all coding, debugging, and testing.

Good Luck!

-GH
 
K

Ken Cox [Microsoft MVP]

Separately, don't throw away your favorite HTML editor. VS.NET 2003 is
notorious for trashing your clean HTML.

Make sure you check out Visual Web Developer Express. It won't change your
code unless you tell it to format.

Ken
 
I

ik

HTML controls are FASTER than ASP.NET controls.

Also, if you want to build a real production website, you should always
choose an html server control before a web control. Real Production
websites, that actually look decent don't use VS.NET for the front end or
UI.

If you aren't concerned about the graphical user interface, regardless of
what your job is, or what you do, you are not building a real production
website for the public because the public actually needs to get work done
and html is the simpliest and fastest solution out there that actually works
on a consistent basis.

Furthermore, you lock yourself into ASP.NET more and more if you use web
controls.
 
D

darrel

jumping on the train and with such a big jump that .Net is there is
something I just find hard to believe... since the arrival of Web forms
(<asp:xxx/>) - will I ever need to do manual HTML code except for the actual
graphical design of my web (e.g. <p> <br> <table>) ???

If you care about valid, semantic markup, and things like accessibility,
then yes.

One of my biggest frustrations with .net is MS's attempt to rename every
single standard HTML object and map it to some sort of control attribute.

The built in controls in .net are great. You can really whip up an
application fast. However, it tends to be IE centric and bloated HTML. So,
in the end, I usually have to spit out my own HTML anyway inside a
repeaterControl or something like that to get it to work well in all the
browsers we're trying to aim for (as well as accomodating accessibility
issues).

For instance, the lack of a TH tag in datagrids is such a simple
oversight...

MS would LOVE it if you stopped using HTML. Your end users may not. ;o)

-Darrel
 
D

darrel

Make sure you check out Visual Web Developer Express. It won't change your
code unless you tell it to format.

Can you use that with ASP.NET 1.1 or is that ONLY for Whidbey? The single
most frustrating thing about '03 is that it can't keep it's hands off of MY
markup. I'd love to upgrade, but we're not probably going to be seeing
Whidbey here in our org for a year or two yet...

-Darrel
 
J

John Saunders

darrel said:
If you care about valid, semantic markup, and things like accessibility,
then yes.

One of my biggest frustrations with .net is MS's attempt to rename every
single standard HTML object and map it to some sort of control attribute.

I'm curious. What do you mean about MS renaming standard HTML objects?
 
D

darrel

I'm curious. What do you mean about MS renaming standard HTML objects?

Well, a lot of the .net control attributes, when rendered in the browser,
are mapped to standard HTML attributes.

An example is the validator controls.

display: static = span with visibility: hidden
display: dynamic = span with display: none

why couldn't the display attribute map directly:

display: "visibility: hidden"
display: "display: none"

That would me so much more intuitive for anyone that knows HTML/CSS.

-Darrel
 
M

Mark Coffman

Actually, layout should be restricted to CSS if possible. Only tabluar data
should be found inside a <table> tag, in my opinion. Not trying to start
anything, but CSS is what you want to do, not <table>s. So, yes, ASP.NET
eliminates quite a bit of html coding, though likely not all.
 
D

darrel

Actually, layout should be restricted to CSS if possible.

Right, but layout is only one part of the page. HTML is still needed for
semantic structure, forms, etc. and this is where .net can get in the way a
bit.

-Darrel
 
J

John Saunders

darrel said:
Well, a lot of the .net control attributes, when rendered in the browser,
are mapped to standard HTML attributes.

An example is the validator controls.

display: static = span with visibility: hidden
display: dynamic = span with display: none

why couldn't the display attribute map directly:

display: "visibility: hidden"
display: "display: none"

That would me so much more intuitive for anyone that knows HTML/CSS.

Darrel, that "display" attribute isn't meant to have anything to do with the
display css style. It has to do with whether the text is displayed
statically or dynamically.

Do you have other examples? The only ones I've ever heard about is that the
Web Controls try to use consistent terminology, so there is a Text attribute
which sets the textual content, regardless of whether any "corresponding"
HTML element has one.
 
D

darrel

Darrel, that "display" attribute isn't meant to have anything to do with the
display css style. It has to do with whether the text is displayed
statically or dynamically.

And it displays it 'statically' or 'dynamically' by wrapping specific HTML
tags around it.
Do you have other examples?

Hmm...well, simple things like setting the text styles of a control:

font-bold="True"

which, of course, maps to

style="font-weight: bold"

-Darrel
 
K

Ken Cox [Microsoft MVP]

Good question. I'll ask around.

darrel said:
Can you use that with ASP.NET 1.1 or is that ONLY for Whidbey? The single
most frustrating thing about '03 is that it can't keep it's hands off of
MY
markup. I'd love to upgrade, but we're not probably going to be seeing
Whidbey here in our org for a year or two yet...

-Darrel
 
J

John Saunders

darrel said:
And it displays it 'statically' or 'dynamically' by wrapping specific HTML
tags around it.


Hmm...well, simple things like setting the text styles of a control:

font-bold="True"

Darrel, this is also not a question of renaming attributes. This is the
syntax for accessing nested properties. It says to set the Bold property of
the Font property to true. So, <asp:TextBox runat="server" id="x"
font-bold="True" /> is the same as:

protected TextBox x;
....
x = new TextBox();
....
x.id = "x";
x.Font.Bold = true;
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

Forum statistics

Threads
473,755
Messages
2,569,537
Members
45,020
Latest member
GenesisGai

Latest Threads

Top