Massoud Mazar

Sharing The Knowledge

NAVIGATION - SEARCH

ReportViewer control toolbar in Google Chrome browser

SQL Server Reporting Services ReportViewer control has a toolbar that is not displayed correctly in Google Chrome browser. You will see something like this:


 The correct display looks like this:


A workaround I'm using is to use JavaScript to find DIV and TABLE elements in the above toolbar and change their "display" style to "inline-block".

Following code can be added to the bottom of the page to accomplish this:More...



Showing animated icon while populating TreeView with PopulateOnDemand

TreeView server control in asp.net can use AJAX behind the scenes to populate child nodes when user clicks on the expand icon next to each node. If the loading process is fast, it works perfectly. But when child nodes are generated by a slow process (like a slow database query) then user experience is unacceptable. User would click on the expand and nothing would happen for a long time, leaving user wondering if the click really did anything.

In such scenarios, an animated icon that lets user know data is being loaded would help a lot. More...

CodeFormatterExtension not working with all Themes

I was experimenting different themes with my BlogEngine blog and noticed not all of them show the correct color coding of my source code examples. There is a simple fix for that which is to copy the section of style.css file related to "Syntax Highlighter" from a working theme to the style.css of the theme you like. That should do the trick.

Using an Installer Class to Start/Remove Tray Icon

Suppose you want to start your SysTray application at installation time and remove it when your application is uninstalled. Here is one way to do this:

Add an Installer Class to your project, and overwrite the Install and Uninstall methods. For Example, assuming your SysTray program is named "My SysTray": More...

Outlook add-in to select "From Account"

If you have setup more than one email account in your Outlook (Work and Home) you may have realized a need for some type of pop-up dialog which will ask you which account you want to use when creating a new email. Outlook lets you define a default account, but obviously that's not good enough. I decided to write a small and simple add-in which will ask me to select the sending account every time I compose a new email. (Even if Outlook already has such a tool, I couldn't find it! and I wanted to gain some Office programming knowledge anyways.)

I used Visual Studio 2008 and created a new Office project of type Outlook Add-in. This will give you the basics you need. Just fill the methods with your code and you are done. More...

Code sample for using iTextSharp PDF library

iTextSharp is a rich code library to create PDF and RTF output. Recently I decided to use it for a client and realized there are not much good code examples available on the internet. Even some of the code samples from its online tutorial wont run.

By doing a lot of try and error and with some help from other posts, I could get the desired output. It took me too much time to gather all this information and thought it may come handy to others. So I put together a sample web application which creates a PDF document and renders it to the client browser. Here is the code behind for the page: More...

serviceInstaller component and its default EventLogInstaller

While working on a Windows Service project in .net (Visual Studio 2008), a minor problem related to defining custom event logs kept bugging me.

As you already know, to debug your Windows Service you should use InstallUtil tool to install the service in your Windows. For InstallUtil to be able to install your Service, you add an Installer to your project which contains a ServiceProcessInstaller and a ServiceInstaller. So far everything is cool. You set the properties on these components and BAM! you can now easily install your Service. If you look closely at the IinstallUtil messages on your screen you will see that it creates an EventLog source with the same name you specify for the Service Name property of the ServiceInstaller component and assigns that source to a standard Windows event log called Application. More...

Welcome to my new blog

I know it's way past due, but i finally decided to spend the time and get this blog software setup on my site.


When I started the MazSoft.com web site (early 1999), my idea was to have a web site to share my thoughts and knowledge. At that time the concept of blogging was not as popular as it is now, and obviously there was no pre-existing software for it, so I started with some simple static HTML files. After I got more involved with creating web application using classic ASP, I converted my site to an ASP web site so I could re-use parts of the UI, and that was it. So, MazSoft.com is still a Classic ASP site for now, until I find the time to move all my previous articles to this new blog.

But before I move old contents to this new system, I may start with some new articles.

In case you need to find those old pages use this link