Forum Moderators: open

Message Too Old, No Replies

Working with ASP.NET

From a CSS/HTML/XHTML perspective.

         

pageoneresults

4:55 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



Man, what did I get myself into? I have two projects right now that are centered around the ASP.NET platform. Both are causing me grief as I've lost the level of control I had when working with classic asp.

I'm running into a steep learning curve here and am wondering if choosing the ASP.NET platform was the right choice (shopping cart, calendering solution, etc.). It's an entirely new ballgame and I'm stressing! Here is a recent communication with my programmer...

Me: I see a lot of controls that are generating HTML markup that I don't want on those pages. Is there a way to bypass all of that?

My Programmer: Depends on what html you want to get rid of, but i can tell you it will not be possible to make it 100% like you want it.

I'm also running into issues with vendor specific attributes that are not passing W3C validation. My mantra has always been that I will not work on pages that I cannot validate. It appears I may need to change that mode of thinking for ASP.NET.

Now the tuff part, getting all of the CSS to work in harmony with the ASP.NET controls.

I guess I have my work cut out for me over the next few months in trying to learn the ins and outs of using the ASP.NET platform.

Anyone else feeling the same way?

f00sion

5:03 pm on Aug 17, 2004 (gmt 0)

10+ Year Member



maybe you need a new mantra?

pageoneresults

5:08 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



maybe you need a new mantra?

Just so everyone knows, f00sion is my programmer. I sent him a link to this topic so he can defend his avid support of ASP.NET.

It took me three years to get him to generate valid code and now we are back to square one! ;)

tomasz

6:04 pm on Aug 17, 2004 (gmt 0)

10+ Year Member



Me: I see a lot of controls that are generating HTML markup that I don't want on those pages. Is there a way to bypass all of that?

Let it go 'Luke', ASP.Net it is not so bad

Lord Majestic

10:02 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I sent him a link to this topic so he can defend his avid support of ASP.NET

Sadly programmers these days might be more concerned about the fact that .NET on their CV might help them beat the tide of offshoring and remain employed (or stay in nice juicy contract).

Tough times, can't blame them really...

encyclo

11:33 pm on Aug 17, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



The following article is on a very good site run by a developer who loves valid XHTML as much as he loves ASP.NET:

[aspnetresources.com...]

Worth a read of some of the other articles there, too. From what I understand (I only do PHP myself) validation is possible, but difficult.

pageoneresults

2:01 am on Aug 18, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member Top Contributors Of The Month



lol. Picture this, the sound of a jet airplane flying overhead at low altitude. That's what I just heard while scanning the article. ;)

But, I then came to this last part of the article which makes me feel a little better. Maybe I'm not as technically challenged as I thought.

There's a common misconception that ASP.NET is easy to master and that it just takes care of everything for you. Not so. ASP.NET is not easy. It's powerful. It puts you in the driver seat. Therefore hacking doesn't go away any time soon.

f00sion, what say ye? Can we implement these response filters?

Thanks for the link encyclo.

Webwork

2:26 am on Aug 18, 2004 (gmt 0)

WebmasterWorld Administrator 10+ Year Member Top Contributors Of The Month



The need to apply another layer/round of filtering/parsing to every page passed from the server(?)leads me to wonder what type of performance hit the server will suffer.

At what point does CPU overhead become an issue?

Anyone know from experience applying this strategy?

Small Website Guy

3:26 am on Aug 19, 2004 (gmt 0)

10+ Year Member



You don't have to use the ASP.NET controls if you don't want to. You also have the option of using the HTML controls which do less, or you could just type the INPUT boxes and TEXTAREAs etc directly yourself. ASP.NET can still access those things by looking at the Form's collection.

Also, beware that the ASP.NET controls won't render correctly on non Internet Explorer browers unless you put some magic code in your Web.config file.

Krapulator

6:13 am on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



I have the same issues as you Pageoneresults. I started delving into ASP.NET and the lack of browser compatibility and the inability to use the inbuilt controls and still validate my pages sent me back to classic ASP.

I think the next version of ASP.NET will resolve some of these issues (wishful thinking?). I certainly hope it does. From a programming perspective, the inbuilt controls streamline so much of the mundane repetitive scripting that you end up doing over and over again on many projects.

Is this a project for yourself or for a client? If it is for a client - I admire you jumping straight into it - it's a bloody steep learning curve.

Good luck with it.

encyclo

6:35 pm on Aug 19, 2004 (gmt 0)

WebmasterWorld Senior Member 10+ Year Member



You don't have to use the ASP.NET controls if you don't want to

True, but they are an important reason why people want to use ASP.NET in the first place.

In another article [aspnetresources.com] on the site I mentioned earlier, the markup from an example control was given:

<table id="_ctl0_vs" class="vsummary" cellpadding="0"  
cellspacing="0" border="0" width="100%">
<tr><td>
<font color="Red">Enter site URL<br></font>
</td></tr>
</table>

Three things (working backwards): a completely unnecessary

<br>
tag (in HTML form, not XHTML), an ugly
<font>
tag, and an invalid
id
for the table (because it starts with an underscore). It is only the last problem which is a validation problem, however, if you stick to good old HTML 4.01 Transitional.

That may well be the best route to take: the markup generated is certainly not XHTML-compatible, and there are always going to be little bits here and there which are going to fail validation, but with HTML 4 you are on much safer territory than trying to go with XHTML 1.0.

Small Website Guy

1:56 am on Aug 20, 2004 (gmt 0)

10+ Year Member



True, but they are an important reason why people want to use ASP.NET in the first place.

ASP.NET gives you a fully featured programming language plus database access. More than enough reasons to use it. The more I use ASP.NET the more I like it.

Like all Microsoft development tools, some of the "features" turn out to be crutches that advanced users realize they are better off not using.

Try using the HTML Server controls instead of the ASP Server controls, ASP doesn't do as much with the HTML contols.

Use the Data Repeater instead of the Data Grid so you can define your own HTML.

Use the ASP Literal control.