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
730
webdialogwindow object reference error
posted

Hello,

I just upgraded to the latest release of asp controls. I created a webdialogwindow in a user control with exposed properties to set them in the webdialogwindow, like width height and image url and so forth. I also created a public method "Show" that takes a messagetype enum and a message string so I can display different types of messages (error, info, warning, question, and confirm).

I placed the user control on aspx page and now every time I call it in the code behind I get an error "Object reference not set to an instance of an object."

Why am I getting this?

Is there a better way to do what I'm trying to do?

Parents
  • 19693
    posted

    Hello marcgh ,

    Can you please share code snippet regarding the User Control + WebDialogWindow issue?

    An isolated sample reproducing the issue will be appreciated.

    Regarding the issue with closing the WebDialogWindow , you can hide it on client in order to avoid the post back.

    Please refer to the below code snippet regarding this:

          <script type="text/javascript">

            function closeWDW() {

                var wdw = $find('<%= WebDialogWindow1.ClientID %>');          

                wdw.hide();

            }   

        </script>

     

       <ig:WebDialogWindow ID="WebDialogWindow1" runat="server" Height="300px"

                Width="400px">

                <ContentPane>

                <Template>

                    <asp:Button ID="Button1" runat="server" Text="Close" OnClientClick="closeWDW(); return false;" />

                </Template>

                </ContentPane>

            </ig:WebDialogWindow>

    Hope hearing from you.

Reply Children