Friday, February 29, 2008

IE may shows "Unspecified error" after clicking on Cancel button of when navigate away from unsaved page

You may encounter "Unspecified error" message throws by IE after you click on Cancel button , when IE warns that you navigate away from an unsaved page. This error happens in both IE 6 and IE 7. Solution to this problem is to put handle the error and prevent them to show on user's browser. Put this codes below into your .aspx page.

 

window.onerror = UnspecifiedErrorHandler;

function UnspecifiedErrorHandler()

{return true;}

Tuesday, December 18, 2007

Indescribable

 

I believe there is a creator for everything ...

All the things aren't just exists by itself ...

Looking at the space, human, and all things on the earth and how things hangs together and works together ...

There's got to be someone who design and architect it ...

Friday, August 24, 2007

Dynamically / programmatically changing connection strings of ASP.NET 2.0 providers at run time

Recently, I've been using .NET web parts and personalization on a project. I am pretty happy with the drag and drop feature and how the personalization works, until I was required to change the connection string of personalization database (Application service database) dynamically on run time, instead of declaring it on web.config. Took hours to find a solution or reference to the issue. Finally, found it out in Scott Gu blog, source code for the built in providers in ASP.NET 2.0, what a relieve!  You can check it in here http://weblogs.asp.net/scottgu/archive/2006/04/13/442772.aspx

So I modify the source code a bit, recompile and change the type of provider in the config file and jobs done.