Solved

Ajax UpdatePanel Functionality

Posted on 2007-11-19
4
389 Views
Last Modified: 2012-06-27
Hi experts,

within a web based application i have a dropdownlist. Whenever an index there is selected and an ok-button is pressed, the page-content below is supposed to change. I thought - ok, thats a good a example to try ajax in my web app. So I used the scriptmanager and embedded my user control in my aspx page in the updatepanel, contenttemplate etc.:

// simplified code
<asp:ScriptManager ID="ScriptManager1" runat="server"></asp:ScriptManager>
  <asp:UpdatePanel ID="UpdateReportPanel" runat="server">
  <Triggers>
      // thats the controlID of the ok button
      <asp:AsyncPostBackTrigger ControlID="ViewReport"/>
  </Triggers>
  <contenttemplate>
    // my user control
    <ti:ProjectStatus id="ctlPStatus" visible="false" runat="server"/>
  </contenttemplate>
</asp:UpdatePanel >

So in the codebehind when a specific entry in the dropdownlist is selected I change the visibility of the usercontrol "ti:projectstatus" to true. I thought thats all I have to do to get the partial page rendering. But still the whole page reloads. What else do I have to do?

 
0
Comment
Question by:arthrex
  • 2
  • 2
4 Comments
 
LVL 6

Expert Comment

by:ventaur
ID: 20313079
Where is the button, "ViewReport", in relation to your UpdatePanel and user control?
0
 

Author Comment

by:arthrex
ID: 20313123
Its above the scriptmanager tag
0
 

Author Comment

by:arthrex
ID: 20313190
maybe, do i have to reference the updatepanel id somwhere?
0
 
LVL 6

Accepted Solution

by:
ventaur earned 400 total points
ID: 20313201
Change your UpdatePanel declaration as follows:
<asp:UpdatePanel ID="UpdateReportPanel" runat="server" UpdateMode="Conditional">

...

Open in new window

0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
Migrate Application To New Mac 5 32
Error in JQuery 5 38
Message not shown 5 33
Need a starter for ETL protocol? 4 42
Foreword (May 2015) This web page has appeared at Google.  It's definitely worth considering! https://www.google.com/about/careers/students/guide-to-technical-development.html How to Know You are Making a Difference at EE In August, 2013, one …
A Change in PHP Behavior with Session Write Short Circuit (http://php.net/manual/en/book.session.php#116217) (Winter 2014)** With the release of PHP 5.6 the session handler changed in a way that many think should be considered a bug.  See the note …
Wufoo.com provides powerful tools for surveying targeted groups, and utilizing data from completed surveys to find trends, discover areas of demand or customer expectation, and make business decisions on products or services.
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to choose which pages of your form are visible to your users based on their inputs. The page rules feature provides you with an opportunity to create if:then statements for y…

910 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now