Amass

DotNetNuke’s IE7 printer-friendly bug - fixed!

July 15th, 2008 Luke

If you’ve worked much with DotNetNuke, you may have noticed a bit of an odd bug: if you use IE7 and click on the printer icon next to a module for a printer-friendly page, the CSS on the page you clicked the icon on…breaks.

This is because the way that DotNetNuke’s module actions work is to inject Javascript into the page, using Response.Write() - having a <script> tag at the start of the HTML document makes IE7 throw up.

The fix is actually very simple(for a developer), however - you need to download the DotNetNuke source, and change line 159 of Library\Components\Skins\ActionBase.vb to this:

159
Page.ClientScript.RegisterStartupScript(Me.GetType(), "DotNetNuke.NewWindow", String.Format("<script>window.open('{0}','_blank')</script>", Command.Url))

Once that’s finished, build your DotNetNuke library - and copy the resulting DotNetNuke.dll into the bin directory of any website that you want to add the fix to. If you’re feeling really lazy, you can download my copy of the dll(built for version 4.8.4) below:

DotNetNuke IE7 print bugfix DLL

IE + ASP.Net forms submit bug

November 29th, 2007 Luke

I recently build a quick textbox-based login page, which worked fine - until we tested it under IE and the form wasn’t submitting properly. If a user entered text into the textbox and pushed enter(under IE), instead of submitting the form it would just refresh the page(although it would post a postback). It took a friend and I a little while to figure out, but we eventually managed (through some googling) to resolve the issue. If you add this:

<input type="text" style="display:none" />

To your form, IE will properly submit the form.

Who would have thought?