Recently a support ticket was sent to me regarding an error customers get while trying to download a file with Google Chrome browser, and the error is ERR_RESPONSE_HEADERS_MULTIPLE_CONTENT_DISPOSITION as shown below: And this error only happens in Google Chrome browser, users of IE, FireFox, and Safari all can successfully download the file. After some further investigation, it turned out that the root cause was that the filename of the uploaded file contains a comma “,”. […]
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 […]
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 […]
I came across to a post by Anil John talking about how to enforce password complexity by using regular expresion. Here is the regular expression he wrote: ^.*(?=.{10,})(?=.*\d)(?=.*[a-z])(?=.*[A-Z])(?=.*[@#$%^&+=]).*$ What it enforces is: Must be at least 10 characters Must contain at least one one lower case letter, one upper case letter, one digit and one special character Valid special characters are – @#$%^&+= This regular expression can be easily used for the RegularExpressValidator control in ASP.NET, and […]
For Windows applications, it might be a good idea to use the EventLog to log application errors because the EventLog is very powerful yet very simple to use. However, it might not be a good idea to use it to log ASP.NET web application errors. Why? There are several reasons: It’s all about security. In the malicious cyber world, the security of the web application is a very big concern of any company, if not […]