.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

UpdatePanel inside a WebPart

Posted By:      Posted Date: September 01, 2010    Points: 0   Category :ASP.Net
I am having problems trying to use an UpdatePanel inside a webpart, the async postback is happening (checked using fiddler and debugging the project to see the events firing), but the contents of the UpdatePanel on the page is not being updated, at the moment all I have in the UpdatePanel is<%=Date.Now.ToString%>To debug it to see if its working, but its not changing, ive tried turning off EnablePartialRendering on the ScriptManager to ensure it works when a normal postback happens and its fine.Any ideas why is not working? Thanks for any help

View Complete Post

More Related Resource Links

Gridview inside updatepanel


I am displaying large amount of data in gridview,the gridview placed within updatepanel,every 1sec i am refreshing updatepanel using ajax timer.my problem is while displaying large data the cpu performance is low,pls give idea to increase cpu performance..

UpdatePanel in a Webpart


I'm exploring the usage of UpdatePanels in WebParts for MOSS 2007. The code I have so far for adding a test update panel is this:

                LinkButton goButton;
                goButton = new LinkButton();
                goButton.ID = "butGo";
                goButton.Text = "Go";
                goButton.Command += new CommandEventHandler(goButton_Command);
                goButton.Click += new EventHandler(goButton_Click);

Validation Controls Inside UpdatePanel

Hi All,If you use validation control, the base validator will render script WebForm_OnSubmit() to the page and add form onsubmit "onsubmit="javascript:return WebForm_OnSubmit();". This script is used to fire client side validation event.Now I have a listview inside updatepanel, when click edit button to fire the listview edit mode, the above validation script is just not rendered. How shall I work around with that? I need to customize the client validation event here.Thanks.

Problem with Report parameter inside SSRS Report Viewer webpart with deployment from one server to a

Hi all,I've got this problem.me and my team have developed a lot of reports by using a SSRS configured in Sharepoint Integration Mode.For accessing these report we are using the Sql Server 2008 Report Viewer Webpart.One of its parameter is the Report ur that is an absolute url so the problem is when I move our solution from server1 to server2 I have to re-editing all pages where I've added the Report Viewer webpart for updating the report url with the new servername otherwise it's impossible to view the report.Is there any official or unofficial way to solve this problem ?many thanks

Problem with Dynamic Controls inside an UpdatePanel

Hello Everybody ,I have this problem,if anyone could help me i'll be so gratefull. I had been created some dynamic radio buttons in a loop inside a dinamy table which is inside an UpdatePanel , but i can not handle the events my code is below:public void MetodoCreacion(){RadioButton RBtn = null;Table table = new Table();TableRow row = null;TableCell cell = null;for (int i = 0; i < 5; i++){row = new TableRow();cell = new TableCell();RBtn = new RadioButton();RBtn.ID = "RBGN_" + i.ToString();RBtn.GroupName = "RBGN1";RBtn.Text = "Opcion " + i.ToString();RBtn.CheckedChanged += new EventHandler(RBtn_CheckedChanged);RBtn.AutoPostBack = true;cell.Controls.Add(RBtn);row.Controls.Add(cell);table.Controls.Add(row);}UpdatePanel1_UpdatePanelAnimationExtender.Controls .Add(table);}public void RBtn_CheckedChanged (object sender, EventArgs e){Label1.Text = ((RadioButton)sender).ID;}and the controls doesent call the event ...thanks a lot

User control inside Updatepanel

Hi,I have a custom control created to autofill the box as typed in. Its working great. But if I put the control inside an Update Panel, it works for the full postback but if partial postback happens (because of the update panel), it does not work. Please advise me. This is very critical for me. Thank you all Kiran

Linkbutton not fire inside the Updatepanel

I have a page with two ajax toolkit popupcontrol extenders, both have a Linkbutton inside the popup window, which is inside a panel and updatepanel. The difference is the second one (Linkbutton2) is inside a Gridview, which is also inside a Updatepanel. The first one works fine, but the second one does not fire when click on it. Please help. The code is as follows: <asp:LinkButton ID="lbnAdd" runat="server" onclick="lbnAdd_Click1">Add New... </asp:LinkButton> <cc1:PopupControlExtender ID="lbnAdd_PopupControlExtender" runat="server" DynamicServicePath="" Enabled="True" ExtenderControlID="" TargetControlID="lbnAdd" PopupControlID="pnlTemplate"> </cc1:PopupControlExtender> <asp:Panel ID="pnlTemplate" runat="server" style="display:none" CssClass="popup_template" Width="499px">asp:UpdatePanel ID="UpdatePanel2" runat="server">  <Triggers>  <asp:PostBackTrigger ControlID = "LinkButton1" />  </Triggers>   <ContentTemplate>table style="width:500px; height: 182px; border-collapse: collapse;">  <tr> <td class="style28">  </td>   <td class="style9">

Button forces postback in updatepanel inside Popup

I have an update panel which is inside a Modal Popup Extender. When I click the Refresh Report button it always calls a postback. I need to stop it from posting back. Ideas?

ReportViewer inside UpdatePanel not working


Has anyone been able to get the ReportViewer to work correctly inside an UpdatePanel?

For me the report renders fine on the initial whole-page refresh, but when I click the next page button the next page renders but doesn't allow me to navigate through the pages anymore. The toolbar says "(blank) of 0" pages and the arrow toolbar buttons for navigating between pages are all disabled.

cannot bind dropdownlist inside from button click inside updatepanel



I have a gridview inside UpdatePanel. 

Inside gridview there is a dropdownlist and a button on each row. On button click I am opening a panel through Modal popup extneder.

Inside that pop up there is again a dropdownlist. I am adding an item into this dropdownlist based on the selection from the dropdown inside gridview. 

like  ddl.items.insert(0,'xyz');

But first time this inserted item is not getting reflected in the dropdownlist. But after one postback this item is getting reflected.

Please let me know how to fix this. I tried UpdateMode conditional and always but didn't worked. If I am not clear let me know.


ConfirmButtonExtender + ModalPopupExtender inside UpdatePanel: what the hell?


Yeah, again a topic about ModalPopupExtender funkiness. Sorry about that. But i have the following problem:

When I have a ConfirmButtonExtender and a ModalPopupExtender inside an UpdatePanel, only the first, third, fifth, seventh and so on click on the "yes" button fires a Click event.

What is the cause of this?

And more important, how to solve this thingy?


<asp:UpdatePanel runat="server" ID="UpdatePanel">
                Click the button to change the world. <br />
                <asp:Button runat="server" ID="WorldChangeButton" Text="Test" />
                <ajaxToolkit:ConfirmButtonExtender runat="server" DisplayModalPopupID="mpe" TargetControlID="WorldChangeButton" />
                <ajaxToolkit:ModalPopupExtender runat="server" ID="mpe" TargetControlID="WorldChangeButton"
                    OkControlID="btnYes" CancelControlID="btnNo" PopupControlID="pnlPopup" />
                <asp:Panel runat="server" ID="pnlPopup">
                    <asp:Button runat="server" ID="btnYes" Text="Yes we can!" CauseValidation="fals

Updating an ASP.NET CheckBoxList inside an UpdatePanel from a Javascript function



I have a asp.net listbox server control that is connected to a jquery plugin that can handle a client side click event for each of the checkboxes it renders.

Whenever I click on a checkbox the click event gets triggered and I make a call to

__doPostBack("UpdatePanel1"""); so that i can update the updatepanel and rebind the checkboxlist inside it.

is it possible to do the rebind first, and then update the updatepanel? how do i do that? because now, the rebind happens on the second time i click on the checkbox.




    <script type="text/javascript">
        $(function () {

overflow:auto not working inside updatepanel


Hi all:
I have a div and a css class that gives overflow. but when i add this div inside updatepanel. overflow:auto doesnt work any solution ?
 <asp:UpdatePanel ID="UpdatePanel1" runat="server" UpdateMode="Conditional">
                <div id="mycontent" runat="server">

Problem with Editing image inside DetailsView inside UpdatePanel



I have a problem and I really hope you'll be able to help me.

I'm trying to add and edit an image which is located in a detailsview which is inside an UpdatePanel. After I read relevant topics in the forum I installed the Ajax Control Toolkit. Below is my source code. When I used it only for insert new image it worked great. The problem caused when I tried to implement it on the Edit mode, i.e. when I tried to edit the image and upload a different image.  Unfortunately it didn't work as I hoped. Nothing happend and the image hasn't been changed. I also tried to change the IDs (AsyncFileUpload ID) to be the same in both places but it didn't work either.

The source code:

<asp:DetailsView ID="dvMovie" runat="server" Height="50px" Width="695px"
                    AutoGenerateRows="False" DataSourceID="sdsMovieById"      
                     BorderColor="#E7E7FF" BorderStyle="None" BorderWidth="1px"

ASP Image inside UpdatePanel changing ImageUrl



I have a WebForm which has an update panel. Inside the panel I have an ASP Image. I have also, 2 ImageButtons which act as the triggers for the UpdatePanel.

<asp:UpdatePanel ID="updImage" runat="server">
          <asp:AsyncPostBackTrigger ControlID="btnBackward" EventName="Click" />
          <asp:AsyncPostBackTrigger ControlID="btnForward" EventName="Click" />
          <asp:Image ID="Image1" runat="server" Width="75px" Height="75px" BorderStyle="Solid" BorderWidth="5px" BorderColor="White" />

In my WebForm, I also have an ASP Image component outside the Update panel.

The ImageUrl of those ASP Image components are loaded from a folder that is outside the WebSite root folder, using the code found in this link:


PopupControlExtender inside the UpdatePanel



I have a PopupControlExtender inside of the UpdatePanel. I use it to edit some of the values on the website.

Basicly it looks like this. If you have PopupControlExtender inside of th update panel whenever a user triggers a partial postback javascript creates the popup panels outside of the UpdatePanelControl - to make sure they are always on the top of other elements. So after every postback you get more and more elements with the same clinetIDs.

Here is a code from Firebug - you can notice Panel1 and all the controls inside of it being generated 3 times when i load a page (once) and twice after two partial postbacks:

<form id="form1" action="Test.aspx" method="post" name="form1">
<input type="hidden" value=";;AjaxControlToolkit, Version=3.0.30930.21526, Culture=neutral, PublicKeyToken=28f01b0e84b6d53e:pl-PL:c83bc095-c5d9-40da-b175-dc46338fcc3a:865923e8:91bd373d:596d588c:411fea1c:e7c87f07:bbfda34c:30a78ec5:42b7c466;" id="ToolkitScriptManager1_HiddenField" name="ToolkitScriptManager1_HiddenField">


<script type="text/javascript">
var theForm = document.forms['form1'];
if (!theForm

dynamic javascript of an .ascx control inside an updatepanel not changing on client between async po


I have a confusing state issue. I found a way around it, but I would like to know why this is happening. First of all, I am using .NET 3.5 and that can't change right now (an easy fix may be the fixed ID capabilities of .NET 4.0).

Type csType = this.GetType();
ClientScriptManager cs = Page.ClientScript;
string jScriptBlockName = "SignUpSignInNameAvailabilityScript";
if (!cs.IsClientScriptBlockRegistered(csType, jScriptBlockName))
{   //NOTE: verified code always enters this
    StringBuilder cstext2 = new StringBuilder();
    cstext2.Append("function GetSignUpSignInNameAvailabilityMessage() { var id = '"
          + CreateUserWizardStep1.ContentTemplateContainer.FindControl("iSignUpSignInNameAvailabilityMessage").ClientID
          + "'; alert(id); return id; }");
    cs.RegisterClientScriptBlock(csType, jScriptBlockName, cstext2.ToString(), true);

This code is in Page_Load of an ascx. The same control is drawn on two separate postbacks of an UpdatePanel in different places of the page thus giving them different client IDs. The code works correctly on the first refresh of web browser; but after UpdatePanel

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend