Jump to content


Check out our Community Blogs

Register and join over 40,000 other developers!


Recent Status Updates

View All Updates

Photo
- - - - -

Loading ASP.net custom server child controls in JQuery dialog

asp.net jquery

  • Please log in to reply
No replies to this topic

#1 Mishalkk09

Mishalkk09

    CC Lurker

  • Just Joined
  • Pip
  • 3 posts

Posted 23 March 2011 - 01:03 AM

Hi,

I have created custom sever control in asp.net which will display with its own data.

For Ex:

Panel1.controls.add(studentdetail);
Panel1.controls.add(staffdetail);

studentdetail and staffdetail are the child controls.Also i have two buttons in the page "Staff" and "student" to set the visibilty of these child controls.
When I click "Staff" button the page would show staffdetail and "student" button will show only studentdetail. Em using Update panel to set the visibilty of
child controls here.But no button event is firing after Update panel is used.

Query 1:

Can you please guide me how to achieve this using ajax(without post back)

Query 2:

My exact requirement is to load these childcontrols inside JQuery dialog for whcih em using the below code in another webform.aspx.

<script type="text/javascript">

        function showDialog() {
            $("#divId").html('<iframe id="modalIframeId" width="100%" height="100%" opacity="0.5" marginwidth="0" marginheight="0" frameBorder="0" scrolling="auto" />').dialog("open");
            $("#modalIframeId").attr("src", "controltest.aspx");
            return false;
        }
        $(document).ready(function () {
            $("#divId").dialog({
                autoOpen: false,
                modal: true,
                height: 400,
                width: 500
               
            });
        });
    </script>

where controltest.aspx is the asp.net server control which has "studentdetail" and "staffdetail" as its child controls. Can I load these childcontorls
seperately inside seperate dialogs? how can access childcontrol present in controltest.aspx in webform.aspx?

Quick reply would be greately appreciated.

Regards,
Mishal
  • 0





Recommended from our users: Dynamic Network Monitoring from WhatsUp Gold from IPSwitch. Free Download