Your Privacy Matters: We use our own and third-party cookies to improve your experience on our website. By continuing to use the website we understand that you accept their use. Cookie Policy
935
How to hide webDialog on Code Behind
posted

I have a detail and create page.

On my Detail Page i call my create page by using javascript and dispaly it to webdialog.

<script type="text/javascript">

 

    function showDialog() {

        var dialogcf = $find("<%=webDialogCreate.ClientID%>");

        //Add code to handle your event here.

        dialogcf.set_windowState($IG.DialogWindowState.Normal, true);

    };

</script>

 

  <ig:WebDialogWindow runat="server" ID="webDialogCreate" Modal="True"  Moveable="False" WindowState="Hidden"

            InitialLocation="Centered" StyleSetName="Office2007Blue" Height="560px" Width="800px">

            <Header CaptionText="Create">

            <CloseBox Visible=false />

            </Header>

            <ContentPane ContentUrl="CreatePage.aspx" ScrollBars="Hidden">

            </ContentPane> 

            </ig:WebDialogWindow>

 

Now my problem is how to hide this WebDialog on my createdpage in code behind.

 

 protected void lnkHide_Click(object sender, EventArgs e)

        {

            //Clear Session

            Session["id"] = null;

            //Hide webDialogCreate  ???

        }

 

I really need your help..

 

Thanks in regards!

Parents
  • 1708
    Suggested Answer
    Offline posted

        Protected Sub btClose_Click(ByVal sender As Object, ByVal e As EventArgs) Handles btnCloseForm.Click

            If Not ClientScript.IsStartupScriptRegistered("closeDialogWindow") Then

                Page.ClientScript.RegisterStartupScript(Me.GetType(), "closeDialogWindow", "closeDialogWindow();", True)

            End If

        End Sub

     

             function closeDialogWindow() {

                 var dialogWindow = this.parent.$find("<%=webDialogCreate.ClientID%>");

                 dialogWindow.set_windowState($IG.DialogWindowState.Hidden, true);

             }

    Just adjust the above btClose_Click code to InkHide_Click...

Reply Children