Monthly Archives: August 2008

6 posts

CheckBoxList and Tooltip

The built-in Tooltip for the CheckBoxList control displays information for the whole CheckBoxList, but what if I want to have a tooltip for each listitem in the CheckBoxList? The ListItem has a very nice property called “Title” which can be used to generate a “tooltip” effect. Here is the code snippet: VB.NET Private Sub CheckBoxList1_DataBound(ByVal sender As Object, _                 ByVal e As System.EventArgs) Handles CheckBoxList1.DataBound     […]

How to format HyperLink NavigateUrl in designer

GridView control has several new fields to give user more control over the GridView’s format, for example, the HyperLinkField is one of them which enable user to easily format the hyper link in a GridView control. But what if you are using a server control that does not support HyperLinkField, such as DataList, Repeater? How can you format the HyperLink’s NavigateUrl in the designer that is bound to a datatable? The answer is to use […]

IErrorInfo.GetDescription Failed with E_FAIL(0x80004005)

When you run a SELECT query in your ASP.NET code to fill a DataSet, you may encounter this error: IErrorInfo.GetDescription Failed with E_FAIL(0x80004005) This error is usually caused by the fact that the table name or some column name happens to be a keyword, such as “name”, “first”, and “date”, etc. If it is the case, then use square brackets around those column names as [name], [first], and [date], and it should fix the error.

How to disable the X button on a Windows Form?

How can you disable the “X” button on a Windows Form so that user has to click a Close button on the form to close the window? You may say just set ControlBox=False for the Form. But it will hide all the buttons, including the minimize and the maximize button. What if you still want user to be able to minimize/maximize the window? Jose Luis Manners described a very simple but slick way to accomplish […]

“Setup cannot copy the file staxmem.dll” error when installing IIS on XP

When I tried to install IIS on my laptop which is running Windows XP Pro SP2, I got this error during the installtion: “Copy error Setup cannot copy the file staxmem.dl_. Ensure that the disk labeled ‘Windows XP Professional Service pack 2 CD’ is in the drive selected below, or provide the location where the file can be found.” After some search on the Internet, it turned out it is a very common error that […]

It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level

When launching a web application, an error like this shows up: It is an error to use a section registered as allowDefinition=’MachineToApplication’ beyond application level.  This error can be caused by a virtual directory not being configured as an application in IIS. There are several causes for this error: 1. Just like the error says, the virtual directory in IIS is not an application folder. To fix, just go to IIS and expand “Default Website” […]