In one of my recent projects I needed to validate whether user's input is a valid date, and this needed to be done client-side, in browser prior submission to the server. Lazy as I am, I Googled for a ready-to-use code snippet. There're plenty of versions out there, but most of them offer incomplete solution and none of them take into account browser locale, you know - the language settings:
So I decided to cook something of my own Read more...
This is probably a very obscure situation, but it happened to me, it could happen to someone else. Scenario: an ASP.NET page with Infragistics UltraWebGrid inside of a WARP panel. A button outside the WARP serves as a trigger for partial postback. First click on the button causes expected partial postback, but on the second click page does full postback and is screwed after that. The issue happens only in IE6/7, page works correctly in IE8.
Another condition - page contains ASP.NET AJAX ScriptManager control with ServiceReference path pointing to an ASMX WebService.
Turned out the issue was caused by project being left in debug mode (in web.config debug="true"). Which caused WebService page to be loaded with parameter "jsdebug" in query string. Which apparently IE6 and 7 didn't like very much. Switching to debug="false" in web.config solved the problem.
Categories: ASP.NET, HTML/CSS, Infragistics, Javascript, Rant Tags: browser, bug, dotnet, Error, html, Internet Explorer, Microsoft, solution
February 22nd, 2010
Yuriy
Recently I upgraded an ASP.NET project from ancient 6.3 version of Infragistics to current (at the moment) 9.2. Suddenly UltraWebGrid control began to display an unpleasant effect - columns that used to have no caption now showed what appeared to be default captions:

Looking at grid's HTML markup I noticed that it set the caption to an empty string (showing code for one column):
<igtbl:UltraGridColumn HeaderText="">
<Header Caption="">
</Header>
</igtbl:UltraGridColumn>
Apparently it's a new behavior in Infragistics 9.x to substitute empty captions with default column names. The solution is to set caption to a single space which, while invisible, is considered a real text caption and is not substituted by anything:
<igtbl:UltraGridColumn>
<Header Caption=" ">
</Header>
</igtbl:UltraGridColumn>
The result:

After upgrading to NetAdvantage 9.1 my UltraWebGrid which uses a WebCombo as editor control was starting to throw "Object Required" error inside of Infragistics own JavaScript code in function "_getContainer". After a bit of experimenting I found out that the error does not happen if I click an existing cell that uses the WebCombo to show the dropdown prior to executing the action that would cause the error.
That lead me to believe that error happens because WebCombo is not initialized in some way and clicking the cell does that initialization. So I tried to simulate that behavior programmatically, by entering and immediately exiting cell edit mode:
// to prevent error - showing and hiding dropdown
var oCell = igtbl_getCellById(sCellId)
oCell.beginEdit();
oCell.endEdit(true);
where sCellId - is ID of any existing cell that uses dropdown as an editor. And Bingo! the error went away. Also beginEdit/endEdit happen so fast, so even though technically they show and hide the dropdown - in reality nothing appears on the screen.
If you get the following error while browsing a page in Internet Explorer:
The value of the 'method' attribute may not be 'html'
chances are MSXML registration is corrupted on your machine. To fix this, open DOS prompt and type following commands:
regsvr32 msxml.dll
regsvr32 msxml2.dll
regsvr32 msxml3.dll
This will re-register MSXML and the error will go away.
Scenario: You're trying to update a template file in your PHPBB 3.0.x forum, for example to include Google Adsense code into overall_header.html file to display banner on top of all the pages. But after modifying and uploading the file nothing changes, board still displays old template.
What is happening - PHPBB displays cached version of the template. Forum software caches commonly used files to improve performance. The solution is to purge cache.

Login to your forum Administration Control Panel and click Run Now in Purge the cache section. After purging is complete changes in your template take effect.
December 29th, 2009
Yuriy
If your ASP.NET application worked fine in your Development environment, but after deploying it to staging or production crashes with error:
Could not load type System.Web.UI.ScriptReferenceBase from System.Web.Extensions
most likely it was compiled against .NET 3.5 SP1 but the target machine has original .NET 3.5 framework without SP1. The solution is download Service Pack 1 and install it on target server. Another possibility - compile the project against original .NET 3.5 framework.
December 11th, 2009
Yuriy
Sometimes I bring information to a couple of my other WordPress blogs via RSS feed. It's a nice feature, allowing you to create several posts at once without manual entry. Unfortunately if RSS feed is broken or improperly formatted it can result in blank posts imported into the blog.
I was looking for a WordPress plugin that would allow me to mass-delete empty posts, but apparently none exist. You can delete posts based on date, tags, category, but not the content. Fortunately if you have access to phpMyAdmin of your MySQL installation - there is a solution. Read more...
If you open an IE Modal Dialog window and later on need to resize it using JavaScript code, standard "window.resizeTo" method doesn't work. Use dialogWidth and dialogHeight instead. For example:
window.dialogWidth='640px';
window.dialogHeight='480px';
Internet Explorer has a well known proprietary modal dialog window that can be opened using showModalDialog DOM command. While it is not a good idea to use browser-specific functionality, for many it's a convenient way to display a modal window and return result back to the parent.
Modal Dialog is designed to display data, accept user input and close window, returning the input back to the parent. It is not meant for postbacks, if you try initiating postback in Modal Dialog, all kinds of weird stuff could happen - from opening postback in a new window to JavaScript errors.
But there is an easy fix for that. If you include following line:
<base target="_self"></base>
inside of your page header in HTML source, e.g.:
<head>
<title>My Page</title>
<base target="_self"></base>
</head>
modal dialog will be able to successfully postback to itself.
Recent Comments