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 1076117
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 16, 20262026-05-16T21:21:59+00:00 2026-05-16T21:21:59+00:00

My content page <asp:updatePanel id=Panel1 runat=server Visible=true> <ContentTemplate> <div> blah blah </div> </ContentTemplate> </asp:updatePanel>

  • 0

My content page

  <asp:updatePanel id="Panel1" runat="server" Visible="true">
         <ContentTemplate>
                <div>
                    blah blah
                </div>
          </ContentTemplate>
    </asp:updatePanel>

    <asp:updatePanel id="Panel2" runat="server" Visible="false">
         <ContentTemplate>
                <div>
                    yada yada
                </div>
          </ContentTemplate>
    </asp:updatePanel>     

Code file ..The following code is at the end of Submit button click event :-

            Panel1.Visible = false;
            Panel2.Visible = true;

Now earlier I was using asp:Panel..then it was working fine..like Panel 1 would hide and Panel 2 would show up instead..it was AFTER I changed asp:Panel to asp:updatePanel that things got screwed up…now the Submit button just won’t work !!

What’s gone wrong suddenly ?? I changed it to updatePanel so the page doesn’t refresh..isn’t this how we implement this thing ???

       <asp:updatePanel id="Panel1" runat="server">
          <ContentTemplate>
          <div>
     <p>
        Type ur name

                <asp:TextBox ID="name" runat="server">
                </asp:TextBox>
       </p>


        <asp:Button ID="btn" OnClick="btn_Click" runat="server" 
        Text="Submit" />
     </div>

    </ContentTemplate>
            </asp:updatePanel>


   <asp:updatePanel id="Panel2" runat="server" Visible="false">
    <ContentTemplate>
    <div>
       Thank You!

    </div>
    </ContentTemplate>
    </asp:updatePanel>
  • 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-16T21:21:59+00:00Added an answer on May 16, 2026 at 9:21 pm

    If you set Visible="false" on an UpdatePanel, it won’t be rendered to the client at all. Therefore, if you’re doing an Ajax postback, the client isn’t going to be able to make the invisible UpdatePanel visible, because it just isn’t there.

    Think of UpdatePanels just as markers, showing which bits of your page you want to update on an Ajax postback. For your scenario, I think the easiest solution would be to use both UpdatePanels and Panels. Also, because the two things you’re updating (the two Panels) are right next to each other, there’s no need for two separate UpdatePanels:

    <asp:updatePanel id="UpdatePanel1" runat="server">
      <ContentTemplate>
        <asp:Panel id="Panel1" Visible="true" runat="server">
          blah blah
        </asp:Panel>
        <asp:Panel id="Panel2" Visible="false" runat="server">
          yada yada
        </asp:Panel>
      </ContentTemplate>
    </asp:updatePanel>
    

    Then in the code-behind, change the Visible property on the Panel controls.

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

Sidebar

Related Questions

I have a masterpage with an update panel: <asp:UpdatePanel ID=UpdatePanel runat=server ChildrenAsTriggers=true EnableViewState=False UpdateMode=Conditional>
I have the following ASP page: <asp:Content ID=Content2 ContentPlaceHolderID=ShellContent runat=server> <form runat=server id=AddNewNoteForm method=post>
I have Update panel in Master page: <asp:ScriptManager id=CartScript runat=server></asp:ScriptManager> <asp:UpdatePanel id=CartBox runat=server updateMode=Conditional>
I have a Content Page with drop down lists within an update panel: <asp:UpdatePanel
<ajaxToolkit:ModalPopupExtender runat=server id=ModalPopupExtender1 cancelcontrolid=btnCancel okcontrolid=btnOkay targetcontrolid=Button1 popupcontrolid=Panel1 drag=true backgroundcssclass=ModalPopupBG /> <asp:Button ID=Button1 runat=server Text=Test
I have an asp:UpdatePanel with an asp:Timer. These are in a Master/Content Page. The
In VS 2008, I have an ASP.NET content page having one master page. I
The code for the asp.net page is: <div class=facebox_content> <% if (CurrentUser.Role == Free)
I am trying my hands on asp.net+ajax+httpmodule. My Form <form id=LoginForm runat=server> <asp:ScriptManager ID=LoginScriptMgr
I have code like this on some aspx page in my Web Application: <asp:Content

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.