.comment-link {margin-left:.6em;}


Tuesday, September 28, 2004

Delete an assembly that's still in use from the GAC

If you want to delete an assembly in the GAC that's still in use, you'll get the message:
Assembly 'XXXXXXXXXXX' could not be uninstalled because it is required by other applications.
If you have stopped all services and still don't succeed in removing it, try this little trick.

- Go to Start > Run
- Type regsvr32 -u "C:\Windows\Microsoft.NET\Framework\v1.1.4322\shfusion.dll"
- Browse to C:\Windows\Assembly, the 'GAC-view' has gone
- Open the GAC-folder
- Delete the folder with the name of the assembly you want to remove
- Go to Start > Run
- Type regsvr32 "C:\Windows\Microsoft.NET\Framework\v1.1.4322\shfusion.dll"

Warning: I take no responsability at all, try it at your own risk!

Tuesday, September 14, 2004

Base Target and Javascript

In our current project we our using some Sharepoint-components on our webpages. If we have to incorporate another website in our website, we use frames.
But all the links in the Sharepoint components had to point to _top because otherwise they just opened in the upper frame.
<base target="_top"> caused problems with some links because they pointed to a Javascript-function. With the base target set, the browser looked for the specification of the function in the target defined.

So we wrote a little script that sets the target property for all links not pointing to a Javascript function.

<script language="Javascript">
for (var i=0;i<window.document.links.length;i++) {
if (window.document.links[i].href.substr(0,11).toLowerCase() != "javascript:") {
window.document.links[i].target = "_top";

Friday, September 10, 2004

Debug Client-Side Script in Visual Basic .NET

Tired of using alert() for debugging client-side JavaScript?
With Visual Studio .NET it's far more easier:

- Open Internet Explorer
- In the menu select Tools > Internet Options
- Click on the Advanced Tab
- Locate the Browsing section
- Clear the Disable script debugging checkbox
- Click OK
- Close Internet Explorer

Now put the next statement in the JavaScript block you want to debug:

When you run your project in debug mode, the Script Debugger will stop and you will be able to debug your script in a more comfortable way...

Make sure to have a look at http://support.microsoft.com/?kbid=317699 if you want more information on this.

Tuesday, September 07, 2004

Bug in ASP.NET validator (!)

This morning I opened a service call at Microsoft for this weird behaviour of the ASP.NET validator.

I just received a mail where Microsoft confirms this IS a bug.

As soon as I have more information, I will post it here...

Update 08/09: I received a confirmation of Microsoft that it is a bug in Internet Explorer. Unfortunatly, they are not going to release a quickfix. So I guess we'll have to wait for the next Service Pack...

Untill then you can use on of these workarounds:
- Use a ValidationSummary
- Put the validators next to the textboxes
- Set their Display to Static
- Use another browser
- Unplug the mouse of the end users, that way they have to use the TAB-key
- Just ignore it ;-)

Saturday, September 04, 2004

Bug in ASP.NET validator (?)

One of my colleagues, Frédéric Pieters, found something weird in the ASP.NET-validators.

If a validator is set to Dynamic and it's placed below the control to validate, it's possible to edit the text of that validator.
If you use the mouse to go to the next field (it works fine if you use the tab-button), the validator is triggered and the focus is on that validator.
If you start to type, you're typing in the text of that validator.
I did some test, and this little trick works on many websites...

For those who want to see what's happening, download this little movie.

Thursday, September 02, 2004

Procedure to script your data (to generate INSERT statements from the existing data)

This procedure generates INSERT statements using existing data from the given tables and views. Later, you can use these INSERT statements to generate the data. It's very useful when you have to ship or package a database application. This procedure also comes in handy when you have to send sample data to your vendor or technical support provider for troubleshooting purposes.

For more information, have a look at the website of the author (http://vyaskn.tripod.com/code.htm#inserts).

The procedure itself can be found here: http://vyaskn.tripod.com/code/generate_inserts.txt

Stefanie Worm is het liefste vrouwtje van de wereld.
Melina is de liefste schatsie van de wereld (Erik De Maeyer).