Solved

Ajax UpdatePanel Functionality

Posted on 2007-11-19
4
388 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

How your wiki can always stay up-to-date

Quip doubles as a “living” wiki and a project management tool that evolves with your organization. As you finish projects in Quip, the work remains, easily accessible to all team members, new and old.
- Increase transparency
- Onboard new hires faster
- Access from mobile/offline

Join & Write a Comment

Introduction (All good things must come to an end (http://en.wikipedia.org/wiki/All_Good_Things...)) The original MySQL API (http://php.net/manual/en/book.mysql.php) has gone away, deprecated by PHP in Version 5.5, and removed from PHP in all curre…
Foolproof security solutions has become one of the key necessities of every e-commerce or Internet banking website. If you too own an online shopping site then its vital for you to equip your web portal with customer security features that can allow…
Use Wufoo, an online form creation tool, to make powerful forms. Learn how to selectively show certain fields based on user input using rules to gather relevant information and data from your forms. The rules feature provides you with an opportunity…
Learn how to set-up custom confirmation messages to users who complete your Wufoo form. Include inputs from fields in your form, webpage redirects, and more with Wufoo’s confirmation options.

705 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

15 Experts available now in Live!

Get 1:1 Help Now