WebDialogBox Loading a usercontrol in to a panel

3 replies. Last post: May 8, 2011 11:50 PM by Riendy Setiadi
Tags :
  • (None)
  • New Discussion
  • New Question
  • New Product Feedback
Matt Member
As per another fourm discussion I used this model to open the webdialog from an asp button.
But I can not get the Loadded control to show. Also I get an exception the second time I hit the button
Any help would be great.
Thank you,

<asp:Button ID="Button1" runat="server" Text="Show WebDialogBox" OnClick="Button1_Click" /> <ISWebDesktop:WebDialogBox ID="dlgBox" runat="server" Width="600px" Height="400px" DialogBoxImage="None" Text="WebDialogBox test"> <ContentTemplate> <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Always"> <ContentTemplate> <asp:Panel ID="Panel1" runat="server"> </asp:Panel></ContentTemplate> </asp:UpdatePanel> </ContentTemplate> <WindowSettings> <CommandButtonStyle> <Active BackColor="#8A887B" BaseStyle="Normal" ForeColor="White"> </Active> <Over BackColor="#C5C2AF" BaseStyle="Normal"> </Over> <Normal BackColor="Control" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False"> </Normal> </CommandButtonStyle> <ContainerStyle BackColor="White" Font-Names="Tahoma" Font-Size="8pt" Width="100%"> </ContainerStyle> <WindowStyle> <Active BaseStyle="Normal" BorderColor="Silver"> <BorderSettings> <Top Style="none" /> </BorderSettings> </Active> <Normal BackColor="White" BorderColor="#B0CFF7" BorderStyle="Solid" BorderWidth="1px" Font-Names="Tahoma" Font-Size="8pt"> </Normal> </WindowStyle> <CaptionStyle> <Active BackgroundImage="/CommonLibrary/Images/WebDesktop/Mac/center_active.gif" BaseStyle="Normal" ForeColor="Black"> <Padding Top="1px" Left="10px" Bottom="3px" Right="3px" /> </Active> <Normal BackColor="Gray" Cursor="Default" Font-Bold="False" Font-Names="segoe ui, tahoma" Font-Size="10pt" ForeColor="Black"> </Normal> </CaptionStyle> <CaptionButtonStyle> <Active BaseStyle="Normal"> <BorderSettings> <Top Color="Gray" /> <Left Color="Gray" /> </BorderSettings> </Active> <Over BaseStyle="Normal"> <BorderSettings> <Bottom Color="Gray" /> <Right Color="Gray" /> </BorderSettings> </Over> <Normal BorderColor="#B0CFF7" Height="17px" Overflow="Hidden" OverflowX="Hidden" OverflowY="Hidden"> <Margin Bottom="-2px" Right="4px" Top="4px" /> </Normal> </CaptionButtonStyle> <CommandButtonDisabledStyle BackColor="Control" BackgroundImage="" BorderColor="ControlDarkDark" BorderStyle="Solid" BorderWidth="1px" CustomRules="" Font-Bold="False" Font-Italic="False" Font-Names="Tahoma" Font-Size="8pt" Font-Underline="False" ForeColor="Gray"> </CommandButtonDisabledStyle> </WindowSettings> </ISWebDesktop:WebDialogBox>
<script type="text/javascript">
    function ShowDialogBox() {
    	var dlgBox = ISGetObject("dlgBox");
    	dlgBox.ShowDialog();
    }
</script>




protected void Button1_Click(object sender, EventArgs e) { Control EditContractControl = LoadControl("controls/EditContacts.ascx"); Panel test = (Panel)dlgBox.FindControl("Panel1"); test.Controls.Clear(); test.Controls.Add(EditContractControl); fpb.ClientAction.InvokeScript("ShowDialogBox();"); }


All times are GMT -5. The time now is 10:38 PM.
Previous Next