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

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: May 28, 20262026-05-28T01:49:56+00:00 2026-05-28T01:49:56+00:00

Im trying to make a certain part of my website without postback when the

  • 0

Im trying to make a certain part of my website without postback when the user click a button.
I used Ajax through asp.net (Placed ScriptManager, and an UpdatePanel) , and I know that I need to serround my content in a ContentTemplate, but it seems that I cant, because I have a “Div” there…

this is my code WITHOUT a contenttemplate:

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

<p>
    Some Text</p>
<p>
    If you dont have a username yet, you can register <a href="Register.aspx">here</a></p>
<div id="LeftDiv">


    <asp:TextBox ID="HowMany" runat="server"></asp:TextBox>
    <br />
    <br />
    <asp:Panel ID="Panel2" runat="server">

    <asp:Button ID="StartToGenerateButton" runat="server" Text="I know it!" 
        OnClick="StartToGenerateButton_Click" />
    </asp:Panel>

    <br />
    <br />
    <asp:RequiredFieldValidator ID="RequiredFieldValidator1" runat="server" ErrorMessage="Please enter your discovery"
        ControlToValidate="HowMany" Display="Dynamic" ForeColor="Red" 
        Font-Bold="True" Font-Size="Small"></asp:RequiredFieldValidator>
    <br />


</div>
<!--LeftDiv-->

<div id="RightDiv">

    <asp:ListBox ID="ListBox" runat="server" Height="200px" Width="120px"></asp:ListBox> 

    <br />
    <br />
    <asp:Panel ID="Panel1" runat="server">

    <asp:Button ID="youWon" runat="server" onclick="youWon_Click" Text="You Won!" />
    </asp:Panel>

    <asp:Label ID="ErrorMessege" runat="server" ForeColor="Red"></asp:Label>
</div><!--RightDiv-->
<div class="clearBoth">
</div><!--clearBoth-->
</asp:UpdatePanel>

how can I go through that ?

  • 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-28T01:49:57+00:00Added an answer on May 28, 2026 at 1:49 am

    Is this what you mean?

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
          <ContentTemplate>
                <!-- your content goes here -->
          </ContentTemplate>
    </asp:UpdatePanel>
    

    You can put your entire content including the div in the content panel of the update panel. Anything in the content template area will postback independently of the main page. You will get a partial postback.
    Does that help?

    EDIT

    To trigger a postback of the panel from a control outside of it then you will need to use the postback trigger element of the update panel to specify the control that should trigger the update

    <asp:UpdatePanel ID="UpdatePanel1" runat="server">
       <ContentTemplate> 
          ... UpdatePanel Content ...
       </ContentTemplate> 
    
       <Triggers> 
          <asp:PostBackTrigger ControlID="btnDemoButtonInDiv" /> 
       </Triggers>
    </asp:UpdatePanel>
    

    .
    See this MS article for (extensive) detail

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

Sidebar

Related Questions

I was trying to make a div fill a certain part of the screen,
I am trying to make an extension as part of which i want certain
I am trying to make a button in Excel which copies a certain range
I'm trying to make Javascript change the style of certain DIV IDs by changing
I'm trying to make a program that reads the value at a certain address.
I'm trying to make it so certain text and images on an HTML page
I am trying to make a website that can sign into other websites for
I'm trying to make certain elements resize according to the screen dimensions when the
I'm trying to make a page where a certain div (with lots of php,
I'm trying to make a web crawler to fetch products from certain sites to

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.