Tuesday 12 February 2008

IIS Asp.Net (Apparently) Bizzarro (turns out) lack of understanding

Had apparently strange goings on with IIS & Asp.Net.

Delivered new mylibrary.dll. User renamed mylibrary.dll to "old mylibrary.dll", copied in new mylibrary.dll. Got error saying 'old mylibrary.dll' could not be loaded into manifest.

After deleting the 'old mylibrary.dll' files the web site loaded ok.

After a discussion we came to the conclusion that IIS loads all the DLL files in the BIN directory irrespective of references within Web.Config.

The site then throws exception when two dlls contain the same Assembly-name - this also makes sense.

So what appeared to be strange behaviour came down to not thinking logically!

Monday 4 February 2008

Asp.Net Ajax Calendar Extender

There is a bug with the AJAX calendar extender in that the style of the popup calendar are not applied if the text-box /calendar extender are hidden when a page first loads.

e.g. Panel with Details on is only shown once valid record found; if the first calendar extender on the page is within this hidden Details panel the calendar will not be displayed correctly when Details does become visible:

image

To fix this have a hidden calendar extender at top of the page:

<!-- Workaround for Calendar not displaying correctly - if hidden when page first loads -->
<div style="display: none"><asp:TextBox runat="server" ID="textbox1" /><cc1:CalendarExtender ID="ceTextBox1" runat="server" TargetControlID="textbox1" /></div>


Calendar is then displayed correctly:



image