Modalpopup, Masterpage, contentplaceholder

Last post 07-06-2008 5:18 PM by Kamalmostofi. 7 replies.

Sort Posts:

  • Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 3:37 PM

    Hi,

    In my project, i have Masterpage and 4 - 5 contentplaceholder. I use CSS to design the page and position the items. In my design I used a #wrapper.

    I click the update/edit button and would like to modalpopup displays the progressbar. what happens is the page increases vertically and modalpopup does not show. During the process, if I scroll the page down, the page gets larger. It does not misplace any items at all. 

     How I can I position the modalpopup? Can anyone help me please?

    Kamal

    ps. I am using VS 2008 and .net 3.5 

  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 4:00 PM
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 10:21 PM
    • Winnipeg
    • Posts 721

    CSS positioning is tricky and without seeing the markup and the stylesheet I don't think you will get much of an answer.

    Remember: mark posts that helped you as the answer to aid future readers

    Why UpdatePanels Are Dangerous
    Why You Should Not Place Your Whole Site In An UpdatePanel
  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 4:22 PM

    Hi,

    Here is my CSS:

    #wrapperOptions

    {width: 833px; padding: 40px 50px 2px;

    background-image: url('../Images/WMD_background_Body.gif'); background-repeat :repeat-y; background-position: 50%;

    position: absolute; margin-left: -460px; margin-top: 105px; top: 490px; left: 520px; clear: both; margin-right : auto; margin-bottom: 0;}

    div#downshadowOptions

    {background-image: url('../Images/WMD_background_footer.gif'); background-repeat: no-repeat; height: 67px; width: 826px; margin-bottom: -65px; margin-top: 35px; margin-left: 0px;}

    div#topshadowOptions

    {background-image: url('../Images/WMD_background_Head.gif'); background-repeat: no-repeat;

    background-position: 50%; height: 360px; width: 825px; margin-left: 129px; top: 282px; left: -15px; position: absolute;}

    ==================================================================================================

    And here is my Master-child page:

    <asp:Content ID="Content4" ContentPlaceHolderID="TGISContent1" Runat="Server">

     

    <ajaxToolkit:TabContainer ID="TabContainer1" runat="server"

    Width="700px" CssClass="visoft__tab_xpie7">

    <ajaxToolkit:TabPanel runat="server" HeaderText="New/Edit Schedule & Rule">

    <ContentTemplate>

    <igmisc:WebPanel ID="WebPanel11" runat="server" Header-Text="New Rule" Header-TextAlignment="Center" Expanded="false" Width="700px">

    <Template>

    <asp:UpdatePanel runat="server" ID="updAddRule">

    <ContentTemplate>

    <asp:Table runat="server">

    <asp:TableRow>

    <asp:TableCell>Select a category:</asp:TableCell>

    <asp:TableCell>

    <igcmbo:WebCombo ID="cmboCategory" runat="server" DataSourceID="dsCategory"

    DataTextField="RemType" DataValueField="RemTypeID" OnSelectedRowChanged="cmboCategory_SelectedRowChanged">

    </igcmbo:WebCombo>

    </asp:TableCell>

    <asp:TableCell>Select a sub-category:</asp:TableCell>

    <asp:TableCell>

    <igcmbo:WebCombo ID="cmbosubcat" runat="server" DataSourceID="dsSubCategory" Width="100px"

    DataTextField="SubCategory" DataValueField="SubCatID">

    </igcmbo:WebCombo>

    </asp:TableCell>

    </asp:TableRow>

    <asp:TableRow>

    <asp:TableCell Width="150px">Description:</asp:TableCell>

    <asp:TableCell HorizontalAlign="Center"><asp:TextBox runat="server" ID="txtrulesDesc" Width="200px" Text="" ></asp:TextBox></asp:TableCell>

    <asp:TableCell >Rule:</asp:TableCell>

    <asp:TableCell ><asp:TextBox runat="server" ID="txtrules" Width="50px" Text=""></asp:TextBox></asp:TableCell>

    </asp:TableRow>

    <asp:TableRow>

    <asp:TableCell>Frequency:</asp:TableCell>

    <asp:TableCell>

    </asp:TableCell>

    </asp:TableRow>

    </asp:Table>

     

    <div class="buttonright">

    <ajaxToolkit:ConfirmButtonExtender ID="ConfirmNewrule" runat="server" ConfirmText="Are you sure?" TargetControlID="cmdnewrules">

    </ajaxToolkit:ConfirmButtonExtender>

    <asp:Button ID="cmdnewrules" runat="server" Width="70px" Text="Add" OnClick="cmdnewrules_Click" />

    </div>

    <ajaxToolkit:ModalPopupExtender ID="ModalPopupExtender1" runat="server"

    TargetControlID="cmdnewrules" PopupControlID="mydiv">

    </ajaxToolkit:ModalPopupExtender>

    <div class="animationpanel2" id="mydiv">

    <asp:UpdateProgress ID="UpdateProgress1" runat="server" DynamicLayout="false" AssociatedUpdatePanelID="updAddRule">

    <ProgressTemplate>

    <div >

    <asp:Image ID="Image1" runat="server" ImageUrl="~/App_Themes/Theme/Images/Anim/indicator.gif" ImageAlign="AbsMiddle" />

    Please wait ......

    </div>

    </ProgressTemplate>

    </asp:UpdateProgress>

    </div>

    </ContentTemplate>

    <Triggers>

    <asp:AsyncPostBackTrigger ControlID="cmdnewrules" EventName="Click" />

    </Triggers>

    </asp:UpdatePanel>

    </Template>

    </igmisc:WebPanel>

    ..........

    I hope I have provided enough information.

    thanks for your help guys.

     

  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 4:49 PM
    Answer
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 10:21 PM
    • Winnipeg
    • Posts 721

    I could be wrong but in your ModalPopupExtender, the PopupControlID has to refer to a server control. Try adding runat=server to the <div id="mydiv"> or turn it into an asp:Panel like this:
    <asp:Panel id="mydiv" runat="server" CssClass="animationpanel2">....</asp:Panel>

     

    Remember: mark posts that helped you as the answer to aid future readers

    Why UpdatePanels Are Dangerous
    Why You Should Not Place Your Whole Site In An UpdatePanel
  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 5:34 PM

    You were correct.Big Smile

     I can now see the panel but it does not display the updateprogress which is inside the panel..... as you have noticed I am using the extender to display a updateprogress animation while the page refreshes or update the database.

    Next question is how can I hide it? It seems the panel is waiting for the user's click - which i don't want that.

    any solution?

    Thanks.

  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 5:41 PM
    • Loading...
    • whatispunk
    • Joined on 03-06-2007, 10:21 PM
    • Winnipeg
    • Posts 721

    There is one flaw with this idea. The ModalPopup will not show until after the postback is completed. You will have to employ some javascript to do what you are trying to do. One way to do this is to use a hidden control for the TargetControlID of the ModalPopupExtender. Then using a client side control call the ModalPopupExtender behavior Show() method to show the popup and trigger your postback. Then you use RegisterStartupScript to inject some javascript to close the panel.

    I can imagine it all in my head, but I am running out of time here to actually code it all up for you. Sorry.

     

    Remember: mark posts that helped you as the answer to aid future readers

    Why UpdatePanels Are Dangerous
    Why You Should Not Place Your Whole Site In An UpdatePanel
  • Re: Modalpopup, Masterpage, contentplaceholder

    07-04-2008, 7:29 PM

    Thanks for your reply.

    I don't know much about Javascript. However, I will do more research on your comment. If you found some time to spare, I would appreciate it. So far, you helped me alot.

    Many thanks,

    Kamal

  • Re: Modalpopup, Masterpage, contentplaceholder

    07-06-2008, 5:18 PM
    Answer

    I solved it.

    Your comment was very helpful and correct and also I followed this link again carefully http://mattberseth.com/blog/2007/07/modalpopup_as_an_ajax_progress.html.

    The reason I could not see the progress indicator was that it was inside DIV tag. I removed the tag and it appears. And also I placed the modalpopupextender at the begining of the contentplaceholder. Now, when I press any button that commuincate with Database, triggers the progress indicator.

    Thank you for your help.

    Kamal

Page 1 of 1 (8 items)
Microsoft Communities
Page view counter