CodeBetter.Com
CodeBetter.Com
RSS 2.0 via Feedburner
           Do you Twitter? Follow us @CodeBetter

Peter's Gekko

public Blog MyNotepad : Imho { }

September 2004 - Posts

  • Firefox, VS 2003, VS 2005 and migrating applications

    Recently I blogged some random thoughts on running ASP.NET apps in the firefox browser. I am really beginnning to like FireFox. To mention my top feauture: + increases font size (and - decreases it). And this really works very well, far better than increase text size in IE. My eyes are getting old and this really helps. So I've done some more systematic research on asp.net apps in ff. Let me share some more results with you.

    The problem: Take a huge ASP.NET intranet app which is browsed with IE. How difficult will it be be to run the app using FireFox ? Are there any cross-issues when porting the app to VS 2005 ?

    1. Appearance : as reported before an asp.net app does by default not look to good at all in FireFox. After introducing FireFox to asp.net in the web.config the app looks a whole lot better.
    2. Input validation : The app uses validation controls and smart-navigation. Validation works but not on the client side. The nice thing about the validation controls is that the validation is also performed on the server. Validation does take an extra roundtrip in firefox, but the the app does not break.
    3. Smart navigation. This just does not work in FireFox. My users like the browser's back-button. That would need a work-around.

    When moving to VS 2005 the appearance is a quite interesting issue. The good thing about VS 2005 is that it is FireFox aware by default. The bad thing is that some of my alignment tricks no longer work in VS 2005. I can no longer create labels of fixed width. I can still create textboxes, dropdown, listboxes and panels of fixed with, but a label always get truncated at the end of the text contained. The reason for this is the document type used by asp.net web forms. You can find the document type in the top of the mark up of a webform.

    In VS 2003, apps this reads:

     <!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >

    In VS 2005 this reads

    <!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN" "http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">

    When you import a VS 2003 app in VS 2005 the doctype is not converted and the fixed width labels still work. You can also change the doctype in the markup of a 2005 page, which will lead to fixed width labels. The other way round does not work, changing the doctype in a 2003 form does not influence actual label width.

    So far most incompatibilities between Asp.net apps and firefox don't look that bad. Importing an VS 2003 app in VS 2005 has larger problems. The app still works but there are quite a lot of things to pay extra attention to. That's for my next post.

    Peter

  • My last Sony ?

    Lost some more hair getting alll details right again after my big XP sp2 nightmare. The machine I had to rebuild from scratch is a Sony laptop. Beautiful machine, espacially the ergonomics. Absolutely quiet, great keyboard and a beautifull display. The latter gave me the headaches. Its brightness can be adjusted, but only using hotkeys. These hotkey use some utility not part of a default XP setup

    The sony support site is a nightmare. It offers some downloads, but these do not work on a default XP. After a registration process they do answer questions: “We only support the original software which came with the machine. In case you lost your original disks you can buy new ones here. No we cannot provide any links to downloadable stuff.” And that was it. My experience with the Sony on-line store had not been that great either. In utter despair I turned my office upside down once more and this time I did find the original disks.

    The utilities were a separate setup not part of the regular XP install. Two minutes later the hotkeys worked again. Under sp2, no problem. My feelings about Sony are mixed. Service stinks but it is still a beautifull machine to work with. I wonder what will win when I need a new machine.

    Peter

     

  • VS 2005 : Firefox just as good (or bad) as IE

    Pictures say more than a thousand words. This is a web page in VS 2003 and the result in IE and FireFox.

    By stretching the labels I can have alligned columns. IE understands that, Firefox does not.

    This is the same page in VS 2005

    In VS I can stretch and alingn the labels. Firefox still doesn't understand. IE doesn't anymore either.

    I know, the labels should be in a table. In my real world the rows of labels are the output of a datalist. Which is a one column table. You can fidle with the HTML to force more columns, my neighbour showed me how. Beep if you want me to delve into that. I still prefer wysiwyg behaviour.

    Peter

  • Firefox is actually a better browser than ASP.NET realizes

    Yesterday I blogged a little of the bad behaviour of my ASP.NET applications in the Firefox browser. As IE is under siege I just have to be prepared for a way out. My apps are indeed intranet apps, according to Shannon, the only thing place the cool ASP.NET apps are good for control properties are usable (imho there is no difference between a cool and a standard proerty) The moment my customers drops IE I'm in trouble.

    Besides Firefox I also tried Opera. Opera has a nice feature, you can set the identity it will report to the server. It can pretend to be IE 4, 5, or 6 or a simple browser. My apps looked far better but Opera cannot work with Windows authentication. That is a showstopper. The night at the opera was a short one. Anyway, I don't like opera music and I didn't like all adds flying around. :)

    As many people reported the main problem with FireFox is that asp.net is unaware of its capabilities. Shannon pointed to a good post by Rolando which lists good articles about browsercaps. Mitch Rupps's post lists well working caps for firefox. The point is where these caps should be included. You could do it in the machine.config and also in the web.config. I think you should do it in the web.config. As there are some incompatibilities it makes sense to do it in the web.config. It states “This app will look good in firefox”.

    The incompatibilties of an asp.net app in firefox I found so far:

    1. Spacing controls in a template using absolute width does not work. I'm a big datalist fan, to emulate a grid I use the controls width to build columns. Does work in IE. Doesn't work in ff or opera. A datagrid looks OK.
    2. The gotdotnet treeview does not claim enough space. It is partly obscured by other controls on the page.

    These things must be fixable.

    As Joseph pointed out my blogs title suggests some involvement with Gecko, the engine of firefox. My Gekko originated in 1986 when I started Gekko Software in the pre web days and points to my previous career as a biologist. This cute little animal seems to have inspired other people as well. There is also a Gekko Software in Germany, they are in the gaming bussiness. And also with them I share no more than a name.

    Peter 

  • Firefox and asp.net applications

    With so many people advocating the Firefox browser, amongst Marc in his DNJ  blog, I just had to give it a chance. Installation is quick, most sites look OK but I still don't understand what happened to my favorites. The on-line manual mentions several times it will import IE's favorites but there is no mention at all where to find them in firefox.

    The most interesting experiment was browsing an ASP.net site. Which was disappointing. Windows authentication does not work. At the start of the session an ff dialog pops up, entering the windows username and pw satifies ff. But most screens don't look right. Some are just blank. The source reveals there is a table, but ff just does not visualize it.

    I'm a big fan of datalists. To allign columns I use fixed width labels. A snippet of typical html rendered looks like this:

    <td class="LIaitem">
    <a id="GekkoDataList1__ctl2_LinkButton3" href="javascript:__doPostBack('GekkoDataList1$_ctl2$LinkButton3','')">-</a>
    <span id="GekkoDataList1__ctl2_Label7" style="font-size:Smaller;width:318px;"></span>&nbsp; &nbsp;
    <span id="GekkoDataList1__ctl2_Label1" style="width:53px;">            </span>&nbsp;
    <a id="GekkoDataList1__ctl2_HyperLink3" href="Projekt.aspx?id=84" style="width:337px;">Dit is een nieuw projekt                          </a>&nbsp;
    </td>

    In IE this result is nice columns of even width, also when the label is blank.

    In Firefox this same pages doesn't look very good. All columns alignment is gone. The html for the same row looks quite different:

    <td class="LIaitem">
    <a id="GekkoDataList1__ctl2_LinkButton3" href="javascript:__doPostBack('GekkoDataList1$_ctl2$LinkButton3','')">-</a>
    <span id="GekkoDataList1__ctl2_Label7"></span>&nbsp; &nbsp;
    <span id="GekkoDataList1__ctl2_Label1">            </span>&nbsp;
    <a id="GekkoDataList1__ctl2_HyperLink3" href="Projekt.aspx?id=84">Dit is een nieuw projekt                          </a>&nbsp;
    </td>

    All attributes of the label, including the width, have gone. No wonder the page is garbled. Pages without tables, just labels and textboxes look just as bad. And again all attributes have gone.

    If my customers are going to switch to firefox (I actually hope they will not, give opera a chance in case you want to drop IE) I have work to do. For the moment it's end of experiment, got real work to do.

    Peter

  • Long live the (WinInfo) text format !

    Complaining helps. WinInfo is back in plain text format ! And back on its usal pleasant (8 pm local) arrival time. The html version was always late.

    Thanks Paul.

    Peter

  • Fixing a broken asp.net installation. (The Web server reported the following error when attempting to create or open the Web project located at the following....) revisited

    November last year I posted a story with this title. It was a fix for the error messgae above. I wasn't the only one having this problem, over time many many comments and comments on the comments were added. It should be turned into a Wiki. In this post I will try to summarize the most usefull comments.

    In the original post I suggested 

    1. aspnet_regiis -i

    to fix the problem. This can be done in a jiffy. In the course of the comments the most succesfull script has grown to

    1. uninstall IIS
    2. delete (rename) the inetpub directory
    3. Make sure the "Distributed Transaction Coordinator" service is running
    4. reinstall IIS
    5. regsvr32 aspnet_isapi.dll
    6. perform aspnet_regiis -i

    which is quite a big job.

    What shines through in a lot of the comments is that the problem is often a security setting. The many installations will set the permissions leading to an ASP.NET server working right. Correcting the permissions by hand might be a faster fix. So before you follow this script I suggest you check the ASPNET account. Does it have sufficient permissions in the wwwroot directory ? Might be a lot a faster.

    <Update>Check this post for a detailed description of the security settings.</>

    Peter

  • How printer friendly are animated banners, or is WinInfo spam after all?

    For a couple of years I have been a faithfull reader of WinInfo daily update. My provider considered it spam for a couple of months but I took the effort to skim my spambox time after time. It was always worth it. Last week the newsletter got a new face, from the classical text only to highly decorated html. My main problem with that are the many animated banners. I don't mind adds, but just can't get used to reading while something keeps flashing right next to the text I'm trying to understand. That's also my reason for not using a dnj default blog skin. The usual trick to get rid of all movement is the printer friendly link. But even these WinInfo pages keep on wriggling. How do want my printer to print that ? How do you want me to read that ?

    Peter

  • What does this button do ? Google is more than Gmail

    Got my Gmail account, thanks to Saso. It is nice. Just like google searches, clean crisp UI and fast. The google toolbar used to be a default install for me, the combination of a search box and a pop-blocker make it irresistable. The pop up blocker is now part of IE and google has a very nifty replacement for the toolbar: the Google browser button Picks the selected text in the browser and starts a search on that. When it cannot find a selected text it pops up a dialog to enter one. Recommended !

    Peter

More Posts

Our Sponsors

Free Tech Publications

This Blog

Syndication

News