This works. You get a nice "--Select Item--" on the combo box but the problem is, the ComboBox is editable. I don't want this behavior. I want the default text to appear in an uneditable combo box. Like this,

StackOverFlow is our friend. There is a much better answer using a Combo Box Behavior. But in this code, there is a small problem.

Popular posts from this blog

If you have ever tried to build a POS (Point Of Sales or Point of Services) application, you might have come across the requirement to print a sales receipt like the following. Not just retail stores, but these receipts are produced by banks, hospitality and healthcare too.

Most of the time, such a receipt can be printed using a POS printer, which looks like the one below. The application developer needs to send ESC/POS commands to such a printer (eg: EPSON) to print the actual receipt. Depending on the manufacturer the capabilities can be vary. However, most of them can handle most of the print commands and print a nicely formatted receipt.

The main advantage of using raw ESC/POS commands for printing is that the printing performance will be faster but this depends on the printer itself.

In this post, I will be using a windows application to send commands to the printer. If you want to do this through a ASP.NET website, the process is a bit more complex and I will try to create anot…

Recently (Not so long ago, more like 10 mins ago) my asked me to automatically redirect the user to the login screen after session is expired. I googled it, found 2 ways. One works well with NON-AJAX websites and it is the simplest.

If you are making a site like facebook, then using the above method would cause number of users to decrease from 1 billion to 0. Why? because this method counts only full page refreshes, not ajax requests.

I am accessing a 3rd party client WCF secured web service using a client certificate issued by them. I have added this client certificate to my servers' certificate store. (Ref#1 (packing a certificate), Ref#2 (importing to store))