Thursday, December 11, 2008

problems changing a readonly text box

Just ran into this problem today. I had a page which was running under .net 1.1
This page had a textbox which was set in the aspx page to readonly=true. there was a 2nd page which was changing the value of the text using some javascript. This all worked.

When i upgraded to .net 2.0 though i ran into problems. The text of the box would appear to change, but the value that actually came through was the original default value. My client side validation passed, but the server side did not since it was still seeing the default value. Turns out that setting the textbox to readonly really is readonly :)

You can work around this issue by not setting readonly in the aspx file. Instead go into your codebehind and use TextBoxID.Attribute("readonly") = true - you'll now have a text box that the user can't (easily) change but you can still change the value of the textbox in your code using javascript.

Friday, September 5, 2008

New microsoft commercial with Jerry Seinfeld & Bill Gates

I'd say this is a good commercial for vista - it leaves me with the same feeling i get when thinking about vista - *shrug* eh.

Tuesday, September 2, 2008

cool service to test website on multiple browsers/os

I discovered a cool little service that you can use to test how your websites behave on many different browsers and several operating systems. It's called The service starts off free, limiting you to 5 minutes each session but unlimited sessions. This is usually good enough to give a website a quick once over or to test some specific functionality of a site.  

You log into the site, request a session, pick which operating system you want to work in which determines which browsers you'll have access to, and then using a VNC like interface directly in the browser window, you get access to the system desktop where you can open which ever browser you like and load up your website. 

If you need more then 5 minutes a session, you can buy 5 minute block intervals starting at $1 each. If you buy them in bulk (starts with 6 or more) the costs go down.

I think this would be an invaluable service for any web developer/designer.

Chrome - the google web browser

So some of you may or may not have heard by now that google, somewhat suddenly, announced availability of a browser they developed. I'm typing this blog post using it. You can download it from - it will live side by side with IE, FF etc.

It does have some rendering quirks on various sites, but for the most part it works. And when it does work, it works fast. It renders pages noticeably much faster then IE6 does. And perhaps even a tad bit faster then FF3. It has tabs which sit all the way at the top of the window. And one nice thing about them is that each tab runs in it's own process so if one crashes, only the one tab goes down. It comes with it's own task manager to monitor the tabs (shift-esc to bring it up) which will show you the cpu, memory and network usage of each tab, plus plugins.

Another nice little feature when you first start it (and it starts as fast as it renders) are medium sized icons on the start page of the most frequently visited sites. I also noticed it will let you resize a multi-line text box it make it easier to type.

And for those of you who prefer to surf anonymously, it comes with an incognito mode, which will basically erase the history, cookies etc of that session once you close the browser. 

I also just noticed one other little feature. The little icon in the corner of the tab will turn grey and rotate counter-clockwise if its trying to connect to a website, and it will turn blue and rotate clockwise if it's downloading content from a site.

If you are using it and notice anything else cool (or not cool) about it, please feel free to let me know in the comments.

Monday, July 28, 2008

competition for google?

I heard them mention on the radio today some new search engine called cool, although it's spelled cuil. They boast that they have indexed 3x as much content as google has.

I've tried 2 searches on them so far and I'm not impressed. Search results took a while to show up on my first search, which was for the maximum memory card size for my camera. It returned just 3 results. The #1 result was for a website which doesn't appear to exist anymore. The 2nd result was also for a website which doesn't exist anymore. Just some parked domain name with a bunch of ads on it now. The 3rd and final result was at least almost on topic. It pulled up a page selling a similar model camera with a bunch of user comments on it. Although no where is my particular model mentioned on the page.

I tried a 2nd search at random for some information related to an online game. Cuil returned ZERO results. Google returned pages of results, although I admit I didn't look past the first page since the first search result was all I really would have needed.

In both searches i typed in the exact same words. I used it without any quotes since I think the average user doesn't use quotes when searching.

There is one thing about cuil I like - if you happen to actually get a page or two worth of results, they display the results in 2 or 3 columns, so you can see more results on the page then with google. You get more a little more sumary text and you get a small image displayed next to each result. Although it would probably be a good idea for them to offer an option to turn off the little image in favor of speeding up the page and having more room for text.

With cuil's layout, I got 8 results in my 3rd search on the top of the page without scrolling, compared to 7 results on google. And cuil gave me a little more text for each result compared to google as well.

In my opinion, isn't ready for prime time yet. Their search results are too sporadic and inaccurate. And their site takes way too long to return the results. Although it's possible this slow down is just growing pains. If they just recently got a lot of press, maybe their servers are getting hammered right now.

I would give them plus marks for the display of the information when they do return relevant results. They do give you a choice of displaying 2 or 3 columns, however, the size of the columns does not change, so it's rather pointless.

I'd say wait 2-3 months and check back.

Wednesday, July 23, 2008

Blank form field results in a null insert

Just a quick little note regarding empty strings and null values.

If you are using a sql or object data source you have the option on the paramters to set convertemptystringtonull to true or false. If set to true, then a blank form field will be treated as a null value. Which means that db column has to accept null otherwise the insert will fail.

I was running into an issue where the insert was failing even though I ConvertEmptyStringtoNull set to false. Turns out you also need to set it to false on the fields within the details view as well. Once I set it to false on both the datasource and the details view, i was able to do an insert and the blank form field was treated as an empty string instead of a null.

Tuesday, July 22, 2008

Microsoft Mobile Live Search

Ok Google. I generally love all your products. Heck even this blog is done using google. But I have to be honest and say that I think Microsoft has got you beat with their latest version of Live Search for mobile devices.

I just discovered this a few days ago after installing a new rom update on my Mogul. Prior to this I've used google maps and goog411 and I was happy with both. But the map on the MS live search has some really nice pluses that google (should copy) doesn't have.

If you have a device that has GPS, it will make use of that. Not only that but instead of just marking your current location as a dot on the map, it uses an arrow which will indicate which direction you are going in. Very useful if you accidentally make a wrong turn. But it gets better. It will also give you turn by turn directions to get to your destination, just like google maps. However, it will give you an audible prompt when you are coming up to the next turn. And it gives you a running countdown in both distance and time until the next turn.

And you can use those abbilities when you use the gas search to find the cheapest gas within a few mile radius of you. Or maybe you want to find the showtimes for the local theaters near you. It will pull those up too and then once you've selected which theater, you can click to either call the theater or have it route directions from your current location to the theater.

And if you are driving and are one of those people smart enough to not type on your phone while driving, you can search via voice. There's no special voice training or voice tags to create. You just say what it is you are looking for and it will find what's relevant. I just searched for 'chinese resturant' and it correctly understood that and returned the 25 closest resturants. I then picked one and had the option to call it, get directions to it, save it or send the info for it as an SMS to a friend.

I hate sounding like some Microsoft fanboy, but it looks like they really outdid google for a mobile search package.

Mobile Technology

I admit I'm one of those people who loves his cell phone. I'm old enough to remember when cell phones were a luxury item. But I'm not so old that I've forgotten when I bought my first cell phone. I was amazed by it at the time. Here's this device that's small enough to fit in a (large) coat pocket and yet with it i can talk to just about anyone, anywhere. And that was about all I could do with it. It didn't play music. It didn't display photos. It didn't even have a color display. And every time I upgrade to a new phone, I'm amazed yet again.

The phones keep getting smaller and yet they also keep having more features. We went from something that was basically an advanced walkie-talkie (isn't that a cool word?) to something that is now basically a mini-pc. In fact, the cell phone I have now is as powerful as my first PC. Actually, in some ways it's more advanced. The internet speeds I get on it are way faster then what I had with dialup on my first PC. The camera it comes with is way better then that first webcam. The teeny tiny microsd card has over double the storage capacity of my first hard drive. About the only thing it doesn't do better is the display. There's only so much you can do with a 2 inch screen after all.

With that first cell phone I went from being able to talk to almost anyone to being able to communicate in almost anyway with anyone. Now I can talk to them or I can send them a text message, or a voice mail, or an email or an instant message or even a video email.

In the palm of my hand I can hold a map of the world, showing me exactly where I am and real time traffic. I can get a satallite view of anyplace on the planet (except Dick Cheney's house) or a street view from almost any major city. Without typing a word I can ask for information for any business and get turn by turn directions to it. In the palm of my hand I have an encyclopedia, a dictionary, an atlas, a tv and shopping.

Some people seem to hate cell phones. They think they take away our personal space. I think though that they give us access to so much from anywhere. And they can never intrude on your personal space as long as the off button always works. :)