Tips & Tricks

146 posts

How to use the ‘Save’ icon in FCKEditor to save FCKEditor content on the server side in ASP.NET

I wrote two posts before regarding the integration and the customization of FCKEditor in ASP.NET and was asked by a reader how to use the “Save” icon  in the FCKEditor’s toolbar set to perform the actual save on the server side. I am sorry for the long delayed answer for that question because I have been tied up with my work and haven’t had much time to look into the problem until recently. When the […]

IEXPLORER.EXE application error referenced memory could not be “read” or “written”

Finally I decided to upgrade to IE 8, and unfortunately my nightmare started soon after the upgrade. Unpredictably, I get an iexplore.exe application error: The instruction at “0x1001677e” reference memory at “0x043a8f64”. The memory could not be “read”. Click OK to terminate the program. It happens sometimes when I am browsing a page, or when I open a new page, or when I close a page, and the memory address is different each time. After […]

Using AJAX ModalPopup with GridView control

This actually applies to other data controls such as Repeater and DataList, but here I will just focus on GridView control. On ASP.NET web site, there is a tutorial titled “using ModalPopup with a Repeater Control”. To make the ModalPopup work, the tutorial says that the ModalPopupExtender must be put within the <ItemTemplate> section of the Repeater control, but the popup panel is outside the Repeater control. The reason is that if the ModalPopupExtender control […]

Parent/Child Window Design Approaches

Popup window can be very helpful for editing records. For example, you have a GridView of your customers, when you click on a row or an “edit” button/icon, a new window pops up for you to edit the selected customer. After the editing is done and the record is saved, the popup window is closed and the parent window is reloaded to reflect the updated information. This is a very common scenario for using parent/child […]

Manually remove Visual SourceSafe control from a solution

There are different ways to remove the Visual SourceSafe control from a controlled solution, and the easiest way is to use the built-in Unbind feature in Visual Studio: select the solution from the Solution Explorer, then open File menu and select “Source Control” then “Change Source Control”. When Change Source Control window loads up, check all the projects in the project list and click “Unbind”, then confirm your action and finally exit out. Now the […]

AJAX UpdatePanel Causing Full Postback

When you use AJAX’s UpdatePanel, you may find that the controls inside of the UpdatePanel generate full postback instead of partial postback, if it occurs to you, then you may need to check your web.config file to see if there is a line like this: <xhtmlConformance mode=”Legacy” /> If yes, then that is the bad guy that causes all kinds of problems in AJAX including the issue mentioned above. Removing the line from web.config  will […]

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 […]

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 […]