I was frustrated with inconsistent result when setting the height if the WebDialogWindow in server side code (it would be too small, then explode out triple the size, despite a small increase in pixel height).
I discovered that the following would make it automatically accommodate its contents:
Style="height:auto;"
Almost - its consistently a shade too small (in IE at least), but about 5-10 pixels
The exact definition of my window is:
<ig:WebDialogWindow runat="server" ID="dlgMessageWindow" InitialLocation="Centered" Width="500px" Modal="true" WindowState="Hidden" Style="line-height: normal; height:auto;" CssClass="MessageText" > <Header CaptionAlignment="Left" CaptionText="Psoriasis" CaptionTextCssClass="MessageHeader"> <CloseBox Visible="true" /> </Header> <ContentPane BackColor="White" CssClass="MessageText"> <Template> <div style="text-align: center; position: relative;"> <p> <asp:Literal ID="txtMessage" runat="server"></asp:Literal> </p> <input type="button" style="width: 100px;" onclick="closeCsaMessageDialog('<%= dlgMessageWindow.ClientID %>')" value='<asp:Literal runat="server" Text="Ok" />' /> </div> </Template> </ContentPane> </ig:WebDialogWindow>
As you can see, i fill the asp:literal control from server side, allowing me to display formatted messages to the users. This is working consistently - but with the slight error in height as mentioned. What can be done here, or is it a bug?
A workaround is to add one more more additional <br/> s to the end of whatever is displaying, and turn OFF the scrollbars on the pane. This gives the visual display I want - it auto-sizes and then just harmlessly clips off the blank bit at the bottom, but it is a kludge.
Not that the dialog's height is also different between firefox and IE...