ASP.NET

104 posts

ASP.NET tooltip alternative: Cool DHTML Tooltip II – Part 2

In Part 1, I showed you how to use Cool DHTML Tooltip in ASP.NET web applications with static data. In this post, I will show you how to use Cool DHTML Tooltip with dynamic data pulled from database. It is actually very simple. Here are the steps: 1. Pull data from database. In code-behind, you need to pull from your database the information that needs to be displayed in tooltip, format the information if needed, […]

ASP.NET tooltip alternative: Cool DHTML Tooltip II – Part 1

ASP.NET built-in tooltip is easy to implement, but it has many limitations, for example, you can’t control the duration of the tooltip, you can’t change the style of the tooltip, you can’t display complicated contents in it, etc. That is why I usually don’t use ASP.NET tooltip but use Cool DHTML Tooltip from Dynamic Drive (www.dynamicdrive.com). There are two versions of Cool DHTML Tooltip and the basic difference is that the second version (Cool DHTML […]

Scroll to the top of an AJAX page upon UpdatePanel postback

By default, when an UpdatePanel is refreshed upon postbacks, the navigation position of the page will not change because the postback is only a partial postback. It is a nice behavior in most cases, but in some cases, it can be very annoying. For instance, if you have a Wizard control defined in an UpdatePanel for user data entry, and if the form is very long, then you will need to scroll to the bottom […]

Invalid character in web.config comment causes “Unable to start debugging” error

When I tried to run a project today and got an “Unable to start debugging on the web server” error: According to the suggestion in the error message, I ran the project without debugging, and it did provide more information about the error: Parser Error Message: An XML comment cannot contain ‘–‘, and ‘-‘ cannot be the last character. Line 27, position 105. Source File: ******\web.config    Line: 27 In my web.config file, I commented out […]

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

Use FCKEditor to update record in ASP.NET

I wrote two posts on the integration and customization of FCKEditor in ASP.NET web application, today I will show how to use FCKEditor to update record. This demo consists of a GridView with an Edit button for each row which upon clicked will load a DetailsView, and the DetailsView has a field called Note where the FCKEditor is used to update it. 1. GridView layout: <asp:GridView ID=”gvCustomerList” runat=”server” AutoGenerateColumns=”False” CssClass=”grid” Width=”100%” CellPadding=”6″ DataKeyNames=”CustomerID”> <Columns> <asp:TemplateField […]

Catch Me If You Can: Use Javascript to Move an Element

This post is inspired by a conversation of mine with some developers in my department regarding a web application we recently built. This application uses a single sign-on system developed by another department to authenticate user whose accesses to our application. Somehow, this single sign-on system does not work well with AOL browser and users who use AOL browser will fail the authentication, thus cannot sign into our application and only see a generic error […]

Use RangeValidator to Validate Date Entry

Suppose you would like to check if a date entered by user is not only a valid date but also meets other requirements, for instance, a date of birth cannot be later than today, the start date of a scheduled task/event needs to be later than today, etc. Of course, if possible, I would use RJS.PopCalendar to accomplish this type of task, but if third-party DLL’s are not allowed, then you can use the built-in […]

Using RJS.PopCalendar in ASP.NET for Date Entry

RJS PopCalendar by Ricaute Jiménez Sánchez is so far the best free calendar control I ever used in ASP.NET in the past three years. It is very powerful, yet very simple to integrate with ASP.NET. Here I will show you how to use this nice control in ASP.NET web applications. 1. Download RJS PopCalendar control from MSDN web site at http://code.msdn.microsoft.com/RJSPopCalendar/Release/ProjectReleases.aspx?ReleaseId=1656. Unzip the downloaded file into a folder you selected. There are several files in […]

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