• Anon (unregistered)
    var LegalUrlChars=new Array
    (
      false, false, false, false, false, false, false, false, 
      false, false, false, false, false, false, false, false,
      false, false, false, false, false, false, false, false, 
      false, false, false, false, false, false, false, false,
      true,  true, false, false, true, false,  false, true,  
      true,  true, false, true,  true,  true,  true,  true,
      true,  true,  true,  true,  true,  true,  true,  true,  
      true,  true, false,  true, false,  true, false, false,
      true,  true,  true,  true,  true,  true,  true,  true,  
      true,  true,  true,  true,  true,  true,  true,  true,
      true,  true,  true,  true,  true,  true,  true,  true,  
      true,  true,  true, true, file_not_found, true,  true,  true,
      true,  true,  true,  true,  true,  true,  true,  true,  
      true,  true,  true,  true,  true,  true,  true,  true,
      true,  true,  true,  true,  true,  true,  true,  true,  
      true,  true,  true,  false, false, false, false, false,
      false, false, false, false, false, false, false, false, 
      false, false, false, false, false, false, false, false,
      false, false, false, false, false, false, false, false, 
      false, false, false, false, false, false, false, false
    );
    
  • St Mary's Hospital for the Holy Peace (unregistered) in reply to Scott
    Scott:
    To be fair, they've recently diverted most of their resources previously allocated to web development towards killing Palestinians.

    Well, when you acknowledge that most of the Israeli railway passengers probably are Israelis (and not Palestinians), they are committing suicide by that Website design.

    The Judean People's Front of Judea becomes a whole new meaning.

  • Anonym0000se (unregistered)
    Yeah, it comes out looking like crap. Everything right justified for some reason (even the sidebar items)

    Um, Hebrew is written from right to left. So it kinda makes sense to have everything right-aligned.

  • Anonymous Coward (unregistered) in reply to Anonym0000se

    Obvious Troll is obvious.

  • anon (unregistered) in reply to pytechd
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

  • anon (unregistered) in reply to pytechd
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

  • Bob Rossney (unregistered)

    Something that I think the original poster could have made clearer - given that people here are straying away from the true horror of that code and talking about other things - is how it's almost certainly being used.

    I'd bet that throughout their XSLT, you see code like this:

    <xsl:call-template name="inner-text-element-open"/>
       <xsl:with-param name="element-name">div</xsl:with-param>
    </xsl:call-template>
    <xsl:text>content</xsl:text>
    <xsl:call-template name="inner-text-element-close"/>
       <xsl:with-param name="element-name">div</xsl:with-param>
    </xsl:call-template>

    which could simply be written like this:

    content
  • eb0ny (unregistered) in reply to NightDweller
    NightDweller:
    The largest news site Ynet is a crappy pile of jumping ads and flash.[/url]
    function shMove595509(theValue) {shTempValue+=theValue;
    if(shTempValue<1) {shTempValue=0;document.getElementById('shRightArr').style.display='none';}
    else document.getElementById('shRightArr').style.display='inline';
    if(shTempValue==(4-1)) {document.getElementById('shLeftArr').style.display='none';}
    else document.getElementById('shLeftArr').style.display='inline';
    document.getElementById('shText').innerHTML=tblSh[shTempValue]['gltext'];
    document.getElementById('shFText').innerHTML=tblSh[shTempValue]['firstText'];
    document.getElementById('shSText').innerHTML=tblSh[shTempValue]['secondText'];
    document.getElementById('shImg').innerHTML=tblSh[shTempValue]['img'];
    }
    What.
  • (cs)

    Come on, people, no self-respecting XSLT madness article can be complete without a mention of starcraft2.com. Do proceed on your own risk though.

  • (cs) in reply to Will
    Will:
    DOH!!! It is just standard SharePoint generated code.

    I am sorry to say i doubted it at first..but its true. The whole true/false array, the code to validate...the script upon script of horror...

    I still maintain that the israli web sucks, but this part is really all Microsoft...the init.js file where the script was found can be seen elsewhere on the web. Most users remove it because it makes the sites load slowly.. I am somewhat dissapointed to reiterate the expected - The REAL WTF is SharePoint, and probably Microsoft...

    And also: When good men do nothing, The RIAA Moths win!

  • Max (unregistered)

    You're blaming the wrong people.

    That site runs on SharePoint. The JS in question comes straight from Microsoft.

  • Coward (unregistered) in reply to Will
    Will:
    DOH!!! It is just standard SharePoint generated code.

    Oh gawd why does this not surprise me?

    click bang

  • (cs) in reply to Anonym0000se
    Anonym0000se:
    Yeah, it comes out looking like crap. Everything right justified for some reason (even the sidebar items)

    Um, Hebrew is written from right to left. So it kinda makes sense to have everything right-aligned.

    Swing... and a miss.

  • Jeremy Friesner (unregistered) in reply to Not THAT Alex
    Not THAT Alex:
    Pim:
    aaberg:
    Actually, that is not a WTF. It's an encrypted base64 string. It's a very good (and secure) way for asp.net to remember it's state.
    Apostrophe!

    Nazi!

    Godwin!

  • Eric (unregistered) in reply to anon
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

  • Poll Master (unregistered)

    Don't forget to vote in the poll on the left hand side. But don't pick the first option, it's over-represented as is (82% of the vote, with four options.)

  • Yuval (unregistered)

    Which is nothing compared with their train service.

  • ham (unregistered)

    var CommentChars = { false, false, false, false, false, true, false, false, false, false, false, false, false, false, false, false, false, false, false, true, false, false, true, false, false, false};

  • (cs) in reply to Kerio
    Kerio:
    a truly brillant use of dom and xslt, that's for sure

    poor tbody :(

    The joke's on them. IE6 won't render tables without a tbody element, and it generates those when it first parses a page. Adding elements via innerHTML or appendChild(), but forgetting the tbody results in... nothing. :P

    If it's true that this is Microsoft generated XSLT, then that's just sad!

  • (cs)

    Using Firefox: Actually, there is some white area at the right of the page on that site, which makes the left part of the page scroll out on the left side of the screen. If I scroll back left and then try to open one of the links at the top (the menu that opens up) I am unable to select anything from the "popup menu" because when I move the mouse out of the initial link (always visible, opens the rest of the menu using onMouseOver or whatever), it closes again. Brillant.

  • (cs) in reply to Anonymous
    Anonymous:
    50% Opacity:
    [Tons of Viewstate]

    ...That's just ASP.NET. It always does that.

    Only if you let it...

    np: CLP - I'm So Trill ft. Tunde Olaniran (Supercontinental)

  • (cs) in reply to MrBester
    MrBester:
    It doesn't have to. There are plenty of (free) examples of keeping viewstate data where it belongs, on the frackin server, not clogging up the output to the client.
    It only belongs on the server if your server happens to have infinite memory.

    (Of course it really shouldn't be storing state for stuff that's in it's default state, but at least my viewstate is safe if I hibernate my machine now and wake it tomorrow...)

    np: CLP - Party Hardy ft. Yo Majesty (Supercontinental)

  • (cs) in reply to Bob Rossney
    Bob Rossney:
    Something that I think the original poster could have made clearer - given that people here are straying away from the true horror of that code and talking about other things - is how it's almost certainly being used.

    I'd bet that throughout their XSLT, you see code like this:

    <xsl:call-template name="inner-text-element-open"/>
       <xsl:with-param name="element-name">div</xsl:with-param>
    </xsl:call-template>
    <xsl:text>content</xsl:text>
    <xsl:call-template name="inner-text-element-close"/>
       <xsl:with-param name="element-name">div</xsl:with-param>
    </xsl:call-template>

    which could simply be written like this:

    content
    Actually, that's the only thing that I understood on first reading the foul thing -- which is probably an infallible sign of rampaging mental illness.

    Ignoring possible standards issues, and certain brain-damage issues, every single piece of this drivel, taken in isolation, makes sense even for those of us with a rudimentary understanding of XSLT. It's only when you step back and ask the, fairly fundamental, question, "Why?" that it truly becomes a WTF. And no, "SharePoint" is not an answer to "Why?"

    Loved the almost invisible non-escaped special characters, even if they do look like a mistake in translation. Such a wise choice of implementation. I liked the "CoreCore..." stuff, too.

    Quoth the Raven, "Nevermore!"

    Or, in view of the XSLT, unquoth.

  • synp (unregistered) in reply to Poll Master
    Poll Master:
    Don't forget to vote in the poll on the left hand side. But don't pick the first option, it's over-represented as is (82% of the vote, with four options.)

    That poll is a WTF in itself. It asks how often you use the railway website.

    Even with the statistical fail, I can't believe 82% visit the site "every day or more often"

  • synp (unregistered)

    According to the site, it was built by netwise. I guess it's these guys:

    http://www.netwise.co.il/Templates/HomepageEng.aspx

  • bleh (unregistered)

    It's probably one of these Microsoft tricks to make a site not work in anything but IE, while making it impossible to see what's going wrong, so the alternative browser vendors couldn't even make it work even if they wanted to imitate IE and greasemonkey doesn't stand a chance either.

    In related news, viewstate is on the page and not on the server so it doesn't matter what server your next request goes to (when using a clustering setup or even multiple datacenters).

  • (cs) in reply to bleh
    bleh:
    It's probably one of these Microsoft tricks to make a site not work in anything but IE, while making it impossible to see what's going wrong, so the alternative browser vendors couldn't even make it work even if they wanted to imitate IE and greasemonkey doesn't stand a chance either.

    In related news, viewstate is on the page and not on the server so it doesn't matter what server your next request goes to (when using a clustering setup or even multiple datacenters).

    I see.

    And that makes it a good idea?

    Needs more salt.

  • (cs) in reply to synp
    synp:
    According to the site, it was built by netwise. I guess it's these guys:

    http://www.netwise.co.il/Templates/HomepageEng.aspx

    To get a good sense of how good it is, you should take a look at their Hebrew homepage. (and no, its not your browser, that's the actual page..i tried with Firefox 3.0.7 and IE7)

    When good men do nothing The RIAA Moths win!

  • the caecus (unregistered) in reply to Anonymous
    Anonymous:
    Whoevar:
    Why Two Kay:
    At least the page looks okay, aesthetically speaking.
    Not using Opera 9.64 ;-)

    Fortunately only the edgy browser elitist crowd will be inconvenienced. Phew, for a second I thought we had a problem.

    Is it even possible to be an elitist by using a free browser?

    captcha: commoveo - not elitist

  • John (unregistered) in reply to Eric
    Eric:
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

    Best explanation of ViewState that I've seen so far. After reading various explanations & examples, I had been none the wiser. After years of refusing to allow ASP.net to generate my html & handle posts, I took the plunge recently, and actually I have to say it makes keeping track of form data quite pleasant (if you still remain vigilent).

  • OMGWTFBBQ (unregistered) in reply to DiverKas
    DiverKas:
    Whiskey Tango Foxtrot? Over.:
    Actually, that is not a WTF. It's an encrypted base64 string. It's a very good (and secure) way for asp.net to remember it's state.

    Viewstate is good for some things, but the size of that string (which is larger than it needs to be) implies that the folks on that website abuse it.

    Viewstate is a good thing. Viewstate thrown back to the client on every page is stupid. With an exclamation point (!)

    This just indicates the level of competence of the developers is slightly above that of a brick.

    No. If your application requires statefulness over a stateless protocol, keep it where it belongs: in the application, not on the server. ASP.Net ViewState is moronic, and the reason that a guerilla team inside M$ has been fighting so hard to bring back the wave of the past: MVC.

  • ModernProgramming (unregistered) in reply to Klaus
    Klaus:
    Anon:
    function AddComment(str) { AddCommentCore(str, true); }

    fuction AddCommentCore(str, bAsComment) { AddCommentCoreCore(str, bAsComment, false, true); }

    function AddCommentCoreCore(str, bAsComment, bFunny, bWTF) { AddCommentCoreCoreCore(.... }

    AddCommentCoreCoreCore(str, bAsComment, bFunny, bWTF, bCheckValidChars){ Core(str, null, null, null, bAsComment, null, null, bFunny, null, bWTF, null, null, null, null, null, null, null, null, null, null, 1, null, true, null, ValidChars[60], null, null, null, null, null, NaN); }

    AddCommentCoreCoreCore(str, bAsComment, bFunny, bWTF, bCheckValidChars){ Core(str, null, null, null, bAsComment, null, null, bFunny, null, bWTF, null, null, null, null, null, null, null, null, null, null, 1, null, true, null, ValidChars[60], null, null, null, null, null, NaN, bFileNotFound); }

    FTFY

  • My Name? (unregistered) in reply to synp

    The WTF is that they are asking for information they should be able to get from the server log. Even if it's not accurate (It'll count you as different users if you open the site from different comps) it'll still be more accurate than the poll (and FAR more accurate than their schedule:))

  • Moonpie (unregistered) in reply to pytechd
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    QFT. (also, QF passionate argument typo. ;)

    The entire purpose of ASP.Net/Webforms was to bring windows developers over to the scary innertubes. The promise was automagical downlevel experience, because windows developers (rightfully) feared the retarded test matrix caused by [n] browsers, running javascript or not, on a mobile device or not, with accessibility features turned on or not, in [x] language.

    Not only was "The Promise" never delivered: M$ bastardized internet development with their idiotic overlays; and delayed Ajax/Web2.0 (which they arguably started in the first place with the xmlhttprequest COM object) for the last 9 years, because of their own hubris. Web2.0 has been around (and in hiding) for some 10 years.

  • ANON_NOT_FOUND (unregistered) in reply to anon
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    Or double-posting. But it's still retarded.

  • Say what? (unregistered) in reply to Eric
    Eric:
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

    Delightful! Please continue to defend a blatant misuse of a stateless protocol and what should be RESTful endpoints; and the increased server power required to handle processing data, actions and workflow, that could have been handled by the client (validation still required).

    I also would like to see a "Worst ViewState Contest". I've personally stumbled across pages with thousands and thousands of lines of

    (textbox value, selected dropdown index, etc.)
    often on pages with less than, for argument's sake, 50 input elements, max. Would you care to take a stab at how those are generally a good idea, but simply caused by developer confusion? Please include a paragraph about WHY THE CONFUSION EXISTS IN THE FIRST PLACE, MICROSOFT, GOGGLES, FILE_NOT_FOUND!

    :D

  • Little Hutmull Tables (unregistered) in reply to John
    John:
    Eric:
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

    Best explanation of ViewState that I've seen so far. After reading various explanations & examples, I had been none the wiser. After years of refusing to allow ASP.net to generate my html & handle posts, I took the plunge recently, and actually I have to say it makes keeping track of form data quite pleasant (if you still remain vigilent).

    Good luck with that!

    When you get tired of the magically generated NON-COMPLIANT html, unstylable tables, inline css, wasteful form posts and fields, and kludgy fixes to non-existent problems(UpdatePanels, Ajax.ASP.Net, etc), be sure to check back in with us. And please bring some of your code to post.

    We'll all be happy to see you!

  • (cs)

    Israel on Rails!

  • ModernProgramming (unregistered)

    var LegalUrlChars=new Array ( 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 0, 0, 1, 1, 0, 1, 1, 0 = 66 = "f" 0, 0, 1, 0, 0, 0, 0, 0 = 20 = " " 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 1, 0, 1, 0, 1, 1 = 2B = "+" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 1, 0, 0, 0 = 08 = "◘" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 0, 1, 1, 1, 1, 1 = 1F = "▼" 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF );

    But I don' know what it means

  • John (unregistered) in reply to Little Hutmull Tables
    Little Hutmull Tables:
    John:
    Eric:
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

    Best explanation of ViewState that I've seen so far. After reading various explanations & examples, I had been none the wiser. After years of refusing to allow ASP.net to generate my html & handle posts, I took the plunge recently, and actually I have to say it makes keeping track of form data quite pleasant (if you still remain vigilent).

    Good luck with that!

    When you get tired of the magically generated NON-COMPLIANT html, unstylable tables, inline css, wasteful form posts and fields, and kludgy fixes to non-existent problems(UpdatePanels, Ajax.ASP.Net, etc), be sure to check back in with us. And please bring some of your code to post.

    We'll all be happy to see you!

    Funny, I was expecting a comment like that, mainly because I would have written the same a few months ago. I use VS to help with the forms, check the generated source and remove any of the crud.

    It's all XHTML1.1 compliant. It's one of my requirements (all pages have to have a W3 strict XHTML link) and one of the major reasons I had put it off.

    It validates on w3.org, VS applies styling in stylesheets rather than inline (finally, though not intelligently). Pages have to render properly in IE6+, Chrome, Firefox, Safari & Opera.

    Basically, as long as you have the mindset of writing html by hand rather than dragging and dropping, it works quite well.

    Anyone who expects an IDE to generate perfect code is an idiot, but to ignore the help an IDE provides is idiotic too. A little common sense is all that is needed.

    This is coming from someone who used to use Notepad2 and has a "Made with Notepad" mug on his desk.

  • ModernProgramming (unregistered)

    var LegalUrlChars=new Array ( 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 0, 1, 0, 0, 1, 0, 0, 1 = 49 = "I" 0, 0, 0, 0, 0, 0, 1, 0 = 02 = "☻" 0, 1, 0, 1, 0, 1, 1, 1 = 57 = "W" 0, 1, 0, 1, 0, 1, 0, 0 = 54 = "T" 0, 1, 0, 0, 0, 1, 1, 0 = 46 = "F" 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 0, 1, 0, 1, 1, 1, 0 = 2E = "." 0, 0, 0, 0, 0, 0, 0, 0 = 00 0, 1, 1, 0, 0, 0, 1, 1 = 63 = "c" 0, 1, 1, 0, 1, 1, 1, 1 = 6F = "o" 0, 1, 1, 0, 1, 1, 0, 1 = 6D = "m" 0, 0, 0, 1, 1, 1, 1, 1 = 1F = "▼" 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF 1, 1, 1, 1, 1, 1, 1, 1 = FF );

  • Little Hutmull Tables (unregistered) in reply to John
    John:
    Little Hutmull Tables:
    John:
    Eric:
    anon:
    pytechd:
    People thing VIEWSTATE is OK?! With Viewstate, every link and button has a hidden post back. When I browse without JS, your site breaks. Many buttons/links cannot be targeted with ENTER, they must be clicked. VIEWSTATE is terrible.

    Uh, viewstate is not responsible for the behavior of links and buttons. It does not cause postbacks.

    The confusion about ViewState isn't really surprising. Many ASP.Net developers do not quite realize what ViewState is and confuse it with the automatic repopulation of form controls after a postback.

    All ViewState does is serialize the state of ViewState enabled elements on the page (textbox value, selected dropdown index, etc.) to a hidden field. When the browser performs a post, ASP.Net will check the values from the ViewState against the values being posted for each of those elements and raise events appropriate to what has happened to the state of the elements since the last post, such as OnSelectedIndexChanged for a dropdown.

    Best explanation of ViewState that I've seen so far. After reading various explanations & examples, I had been none the wiser. After years of refusing to allow ASP.net to generate my html & handle posts, I took the plunge recently, and actually I have to say it makes keeping track of form data quite pleasant (if you still remain vigilent).

    Good luck with that!

    When you get tired of the magically generated NON-COMPLIANT html, unstylable tables, inline css, wasteful form posts and fields, and kludgy fixes to non-existent problems(UpdatePanels, Ajax.ASP.Net, etc), be sure to check back in with us. And please bring some of your code to post.

    We'll all be happy to see you!

    Funny, I was expecting a comment like that, mainly because I would have written the same a few months ago. I use VS to help with the forms, check the generated source and remove any of the crud.

    It's all XHTML1.1 compliant. It's one of my requirements (all pages have to have a W3 strict XHTML link) and one of the major reasons I had put it off.

    It validates on w3.org, VS applies styling in stylesheets rather than inline (finally, though not intelligently). Pages have to render properly in IE6+, Chrome, Firefox, Safari & Opera.

    Basically, as long as you have the mindset of writing html by hand rather than dragging and dropping, it works quite well.

    Anyone who expects an IDE to generate perfect code is an idiot, but to ignore the help an IDE provides is idiotic too. A little common sense is all that is needed.

    This is coming from someone who used to use Notepad2 and has a "Made with Notepad" mug on his desk.

    Right. Only, IME, it's more work to go backwards from the cruft VS generates, than to write semantically correct html by hand to start with (which is all i expect from the IDE-generated code, and has been a perpetual battle with MS products). The [built-in, ships-with] .Net controls don't natively generate xhtml compliant code, and they litter the output with tables, inline styles, divitis, etc., so you must be writing your own controls, using repeaters gratuitously (about the only control they got right), or stepping right into the kitchen sink chain with extenders?

    BTW, I've been in .Net since beta, and have yet to use the toolbox for anything (beyond hello-worlds); I also preferred write.exe to notepad.exe, only because it had better control stops. ;)

    Then, one bright, sunny day, i met Ultra-Edit. Oh, the loves!

  • Davi (unregistered) in reply to synp

    Guess it wouldn't help suggesting they tried rails, since they must have already lots of it.

  • justin (unregistered)

    The thing is, having used XSLT a lot, this only seems a little excessive.

    The hoops you have to jump through sometimes....

  • ölf (unregistered)

    On the positive side of things, at least they're not called \escapeProperly, \esc@peProperly and \esc@pePr@erly the way it's usually done in LaTeX.

    Hey, I never said it was a big positive side.

  • synp (unregistered)
    John:
    synp:
    NightDweller:
    synp:
    According to the site, it was built by netwise. I guess it's these guys:

    http://www.netwise.co.il/Templates/HomepageEng.aspx

    To get a good sense of how good it is, you should take a look at their Hebrew homepage. (and no, its not your browser, that's the actual page..i tried with Firefox 3.0.7 and IE7)

    Kinda ugly, but what's wrong with it?

    Works OK in Safari.

    Very definately ugly. Who in their right mind would align-right all the text?

    You didn't even look. It's all centered.

  • (cs)

    Fuuny, the article itself is a bit of a WTF because a couple of

    <

    should actually have been written as

    &lt;

    If you go and poke fun at someone else's HTML skills, at least make sure you're not goofing up yourself.

  • (cs)
    synp:
    NightDweller:
    synp:
    According to the site, it was built by netwise. I guess it's these guys:

    http://www.netwise.co.il/Templates/HomepageEng.aspx

    To get a good sense of how good it is, you should take a look at their Hebrew homepage. (and no, its not your browser, that's the actual page..i tried with Firefox 3.0.7 and IE7)

    Kinda ugly, but what's wrong with it?

    Works OK in Safari.

    If the intent was to have the same info on the English language page as on the Hebrew one, I think they failed. That said, it does look the same in IE7 and SeaMonkey, so I'm not complaining.

  • John (unregistered) in reply to synp
    synp:
    John:
    synp:
    NightDweller:
    synp:
    According to the site, it was built by netwise. I guess it's these guys:

    http://www.netwise.co.il/Templates/HomepageEng.aspx

    To get a good sense of how good it is, you should take a look at their Hebrew homepage. (and no, its not your browser, that's the actual page..i tried with Firefox 3.0.7 and IE7)

    Kinda ugly, but what's wrong with it?

    Works OK in Safari.

    Very definately ugly. Who in their right mind would align-right all the text?

    You didn't even look. It's all centered.

    Very definitely right aligned: [image]

  • (cs) in reply to Sean
    Sean:
    XSLT has nothing to do with the DOM. The DOM is a very specific API for accessing, modifying, and creating XML documents; it is not a generic term for an XML document's structure.
    Well, not quite. DOM is firstly the model of the document's structure and only secondly the standard API for working with that structure. (Alas, it's a fairly horrible standard API as implemented in most languages, but that's a separate matter.) That it is a model of the structure of an XML document makes it very relevant for XSLT, both for implementors and users.

Leave a comment on “Where the Wild Web Things Are”

Log In or post as a guest

Replying to comment #:

« Return to Article