Yearly Archives: 2008

47 posts

Hosting provider

I having been using IXWebhosting as my hosting provider for about two years, and now I am thinking switching to another provider. The reasons are: 1. Long waiting period for the help desk ticket. Usually about 6 hours, and up to 24 hours. 2. Some staff who answer the help ticket do not have enough knowledge and don’t know what they are doing. For instance, they will promise you that your issue is resolved and […]

Meta Refresh tag

Since I decided to stop using www.techhippos.net, I created a simple index.php with a META refresh tag to redirect visitors to my new site. This is what I used in my index.php file: <meta http-equiv=”refresh” content=”10; https://www.learningpenguin.net/index.php” > This works fine in FireFox, but in IE, it keeps refresh itself without redirecting to the new site. It took me quite some time to figure out that I missed “url=” for the destination URL. So it […]

Adding Background Color to RadioButtonList Items

With the same CSS and similar code as I posted before for adding background color to CheckBoxList items, we can do the same thing to a RadioButtonList control. Here is the code-behind file: Private Sub RadioButtonList2_DataBound(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles RadioButtonList2.DataBound Dim cols As Integer = Me.RadioButtonList2.RepeatColumns If (cols = 0) Then cols = 1 End If For i As Integer = 0 To Me.RadioButtonList2.Items.Count – 1 Dim j As […]

Adding Background Color to CheckBoxList Items

UPDATE 12/08/2008: The CheckBoxList control in my example has RepeatColumns=0 and RepeatDirection=Vertical. if your RepeatColumns > 0, then you will need to change RepeatDirection=Horizontal, and also change the code behind as follows: Private Sub CheckBoxList1_DataBound(ByVal sender As Object, _ ByVal e As System.EventArgs) Handles CheckBoxList1.DataBound Dim cols As Integer = Me.CheckBoxList1.RepeatColumns If (cols = 0) Then cols = 1 End If For i As Integer = 0 To Me.CheckBoxList1.Items.Count – 1 Dim j As Integer […]

Desktop client for blogging

I like to use desktop client software for writing blog posts, and I use Windows Live Writer on my Windows machine and ScribeFire when I am on my Linux machine. I know, ScribeFire is not really a desktop client so to speak, but I can’t find a very good desktop blog client for Linux, so I use this FireFox add-on until I can find a good satisfactory desktop blogging tool for Linux. One of the […]

File download with Response stream not working in UpdatePanel

It is very common to use the Response stream to manage file download process. For example, the following code snippet shows how to use the Response stream to download any file: The above code will work fine in most cases, however, if the Download button is in a UpdatePanel, then it will throw an AJAX error like this: The error message tells the cause the error: you cannot use Response.Write in the UpdatePanel, so how […]

Processing feedback with JavaScript and CSS

I wrote a post before about giving user some feedback when a long process occurs. It is very simple if you use AJAX as the post shows. But what if your boss told you that you can’t use AJAX for whatever reason, like my boss told me? Well, the good news is that you still can do it with JavaScript and CSS. The trick is to use JavaScript’s setTimeout function to repeatedly check the value […]

JavaScript code works if embedded in aspx page, but not if included in .js file

Say if you are using the following JavaScript function to alert user if a TextBox is empty: <script language=”JavaScript” type=”text/javascript”> function validateInput() { if (document.getElementById(‘<%=TextBox1.ClientID%>’).value=””) { alert(“The text box is empty!”); } } </script> If the above code is embedded in the aspx page, it works as expected. But if you put the above function in a .js file and include it in your aspx file, you will get a “Object expected” error in IE, […]

Wubi – what is it?

Wubi stands for Windows-based Ubuntu Installer, it is one of Ubuntu’s smart ways to convince Windows users to switch to Ubuntu. Wubi allows you to install and uninstall Ubuntu as any other Windows application, in a simple and safe way. Remember the old days when you tried to install Windows and Linux on the same machine with the dual-boot options? You have to prepare your partition very carefully, otherwise, the Linux install will wipe out […]