Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7553189
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 30, 20262026-05-30T10:58:49+00:00 2026-05-30T10:58:49+00:00

On my MasterPage I have 2 update panels which are surrounded with Panels. Two

  • 0

On my MasterPage I have 2 update panels which are surrounded with Panels. Two of them contain ‘Details View’ controls and some buttons.

On the other hand, I have one UpdatePanel which contains image buttons and link buttons.

The idea is that I’m fetching from the database the messages ( 2 kinds), showing them on the Page. When the user clicks on a button (LinkButton or ImageButton), he or she sees a ‘Popup Control’. On the popup control, he or she can see the message details and if needed, cancel them or approve.

Here is where I am stuck. If I remove the ImageButtons from the UpdatePanels, I won’t be able to refresh them without a full postback.

Should I have ‘popup extensions’ in the UpdatePanel with the ImageButtons, but then when I click on the button from ‘popup panel’ – it disappears ( there is no full postback, it just disappears) – it should just change the DetailsView page.

How do I make it work?

Thanks in advance !

(I need this solution because I want to use a timer to refresh LinkButtons )

here is my code behind :

protected void Page_Load(object sender, EventArgs e)
{
    try
    {
        //here im pulling data from database and binding it with 'details view' controls, its not big deal so i think i don't have to show it?
        wyswietl_powiadomienia_o_wydarzeniach();
        wyswietl_ilosc_zaproszen_do_przyjaciol();
        wyswietl_ilosc_nieodczytanych_wiadomosci();

    }
    catch (Exception)
    {
    }
}


protected void ButtonWczesniej_Click(object sender, EventArgs e)
{

    DetailsViewEventsRequests.PageIndex = DetailsViewEventsRequests.PageIndex - 1;
    ButtonDalej.Enabled = true;
    wyswietl_powiadomienia_o_wydarzeniach();

}
protected void ButtonDalej_Click(object sender, EventArgs e)
{
    // 
    DetailsViewEventsRequests.PageIndex = DetailsViewEventsRequests.PageIndex + 1;

    ButtonWczesniej.Enabled = true;
    wyswietl_powiadomienia_o_wydarzeniach();
}

protected void ButtonInvLeft_Click(object sender, EventArgs e)
{
    DetailsViewIfFriends.PageIndex = DetailsViewIfFriends.PageIndex - 1;
}
protected void ButtonInvRight_Click(object sender, EventArgs e)
{
    DetailsViewIfFriends.PageIndex = DetailsViewIfFriends.PageIndex + 1;
}

And my aspx: (only one updatepanel with detail’s view because 2nd one is very simillar)

<div id="NotifyAreaWhite">
    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
        <ContentTemplate>
            <div id="NotifyAreaDiv">
                <div id="NotifyDivMail">
                    <div id="NotifyLeftMSG"><asp:ImageButton ID="ImageButtonNotifyMsg" runat="server"  
                            ImageUrl="~/images/msg.png" PostBackUrl="~/wiadomosci.aspx" 
                            ToolTip="Wyslij wiadomosc" /></div>
                    <div class="NotifyRight"> <asp:LinkButton ID="LabelNotifyMsgNo" runat="server"  Text="0" Font-Size="Large" PostBackUrl="~/wiadomosci.aspx"/></div>
                </div>
                <div class="NotifyDiv">
                <div id="NotifyLeftFrend" class="NotifyLeft"> <asp:ImageButton ID="ImageButtonNotifyFrends" runat="server" 
                        ImageUrl="~/images/friends.png" 
                        ToolTip="Zaproszenia od znajomych." /></div>
                <div id="NotifyRightFrend" class="NotifyRight"><asp:LinkButton ID="LabelNotifyFrendsNo" runat="server" Text="0" Font-Size="Large"/></div>
                </div>
                <div class="NotifyDiv">
                <div id="NotifyLeftWyd" class="NotifyLeft"> <asp:ImageButton ID="ImageButtonWydarzenia" runat="server" ImageUrl="~/images/event.png" ToolTip="Zaproszenia do wydarzen." /></div>
                <div id="NotifyRightWyd" class="NotifyRight"> <asp:LinkButton ID="LabelNotifyEventsNo" runat="server" Text="0" Font-Size="Large"/></div>
                </div>
                </div>
                     <asp:ModalPopupExtender ID="PanelZaproszeniaEventy_ModalPopupExtender" 
                        runat="server"  Enabled="true" OkControlID="ButtonZamknijOkno" CancelControlID="ButtonZamknijOkno"
                        TargetControlID="ImageButtonWydarzenia" PopupControlID="PanelZaproszeniaEventy"
                        BackgroundCssClass="NotifyPageTloClass"/> //extender showing Panel
                     <asp:ModalPopupExtender ID="PanelZaproszeniaEventy_ModalPopupExtenderCyfra" 
                        runat="server"  Enabled="true" OkControlID="ButtonZamknijOkno" CancelControlID="ButtonZamknijOkno"
                        TargetControlID="LabelNotifyEventsNo" PopupControlID="PanelZaproszeniaEventy"
                        BackgroundCssClass="NotifyPageTloClass"/>

                      <asp:ModalPopupExtender ID="PanelProsbyOznajomosc_ModalPopupExtender" 
                        runat="server"  Enabled="true" OkControlID="ButtonFrendCloseNotifier" CancelControlID="ButtonFrendCloseNotifier"
                        TargetControlID="ImageButtonNotifyFrends" PopupControlID="PanelProsbyOznajomosc"
                        BackgroundCssClass="NotifyPageTloClass"/>
                      <asp:ModalPopupExtender ID="PanelProsbyOznajomosc_ModalPopupExtenderCyfra" 
                        runat="server"  Enabled="true" OkControlID="ButtonFrendCloseNotifier" CancelControlID="ButtonFrendCloseNotifier"
                        TargetControlID="LabelNotifyFrendsNo" PopupControlID="PanelProsbyOznajomosc"
                        BackgroundCssClass="NotifyPageTloClass"/>
          </ContentTemplate>
    </asp:UpdatePanel>
</div>

<asp:Panel ID="PanelZaproszeniaEventy" runat="server" Width="318px" CssClass="NotifyWydTlo" >
     <asp:UpdatePanel ID="UpdatePanelZaproszeniaEventy" runat="server" RenderMode="Block">
        <ContentTemplate>
                    <asp:DetailsView ID="DetailsViewEventsRequests" runat="server" DataKeyNames="Charakterystyka" AutoGenerateRows="False" Height="17px" Width="313px" HorizontalAlign="Center" onitemcreated="DetailsViewEventsRequests_ItemCreated">
                        <Fields>
                            <asp:BoundField DataField="UserName" HeaderText="Zalozyciel" SortExpression="Nazwisko" />
                            <asp:BoundField DataField="Miasto" HeaderText="Gdzie?" SortExpression="Miasto" />
                            <asp:BoundField DataField="Data_ZalozeniaWydarzenia" HeaderText="Data wyslania" SortExpression="Miasto" />
                        </Fields>
                        <FooterTemplate>
                        </FooterTemplate>
                        <HeaderTemplate>
                            <div>
                                <div style="float:left;">
                                   <asp:Label ID="LabelNazwaWydarzenia" runat="server"  
                                      Text='<%# Eval("Nazwa_Wydarzenia") %>'></asp:Label>
                                </div>
                                <div style="float:right; margin-left:5px;">
                                   <asp:Button ID="ButtonZobacz" runat="server"  CssClass="myButton" Text="Zobacz Wydarzenie" Font-Size="X-Small" Width="150px" ClientIDMode="AutoID" OnClick="ButtonZobacz_click" UseSubmitBehavior="True"/>
                                </div>
                            </div>
                        </HeaderTemplate>
                        <EmptyDataTemplate>
                            <table id="Table1" runat="server" style="border-collapse: collapse;border-color: #999999;border-style:none;border-width:1px; color:#FF5041; margin-left:auto; margin-right:auto;">
                                <tr>
                                   <td>Nie masz zadnych zaproszen.</td>
                                </tr>
                            </table>
                        </EmptyDataTemplate>
                    </asp:DetailsView>
            <table style="margin-left:auto; margin-right:auto;">
                <tr>
                    <td>
                        <asp:Button ID="ButtonWczesniej"  Width="69px" Height="41px" runat="server" Text="<<" OnClick="ButtonWczesniej_Click" CssClass="myButton" /></td> //button previous msg
                    <td>
                      <asp:Button ID="ButtonDalej" Width="69px" Height="41px" runat="server" Text=">>"  ///button next msg
                            OnClick="ButtonDalej_Click" CssClass="myButton"/></td>
                </tr>
            </table>
        </ContentTemplate>
    </asp:UpdatePanel>
    <div style="margin-left:auto; margin-right:auto; width: 112px;">
        <asp:Button CssClass="myButton" ID="ButtonZamknijOkno"  Width="100%"  //button closing popup
        Height="41px" runat="server" Text="ZAMKNIJ"/>
    </div>
</asp:Panel>

I hope i described it well. Sorry For my weak english and some Polish words in code 🙂

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-05-30T10:58:51+00:00Added an answer on May 30, 2026 at 10:58 am

    As i should do at the begining i made this example on empty page and try something else.. mode=”Conditional” did the trick.

    I should give that code before, not that long one 🙂

    <asp:UpdatePanel ID="UpdatePanel2" runat="server" UpdateMode="Conditional">
            <ContentTemplate>
            <asp:HyperLink ID="HyperLinkPanelOn" runat="server">click here to show popup</asp:HyperLink>
                <asp:ModalPopupExtender ID="PanelZaproszeniaEventy_ModalPopupExtenderCyfra" 
                runat="server"  Enabled="true" OkControlID="ButtonClose" CancelControlID="ButtonClose"
                TargetControlID="HyperLinkPanelOn" PopupControlID="Panel1" BackgroundCssClass="NotifyPageTloClass" />
            </ContentTemplate>
        </asp:UpdatePanel>
        <asp:Panel ID="Panel1" runat="server">
            <asp:UpdatePanel ID="UpdatePanelPopUp" runat="server">
            <ContentTemplate>
                <asp:Button runat="server" Text="postback" />
                <asp:Button runat="server" Text="postback" />
             </ContentTemplate>
            </asp:UpdatePanel>
            <asp:Button ID="ButtonClose" runat="server" Text="Zamknij" />
        </asp:Panel>
    

    So simple.. I thought it’s something bigger :/

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

I have a master page which has some user controls within an update panel.
I have a ASP updatepanel, within that panel I have some controls which got
I have masterpage and i am using update panels for all my partial page
I have a masterpage setup, with a pageLoad in the topmost masterpage, which calls
I have a web application where the masterPage/template contains some static HTML that never
I have a website on with MVC, which has a dropdown in the masterpage.
TGIF, I have a website I'm developing which is using ASP.NET masterpage/sitemap/content pages setup.
I'd like to have X number of Ajax panels on my list page which
I have a masterpage with an update panel: <asp:UpdatePanel ID=UpdatePanel runat=server ChildrenAsTriggers=true EnableViewState=False UpdateMode=Conditional>
I have a masterpage which is set via a HTTPModule on PreInit(). HAPPY TIME!

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.