Last post Jul 24, 2014 08:13 AM by CharlZA
Mar 21, 2006 10:11 AM|Scolja|LINK
Mar 21, 2006 10:30 AM|Luis Abreu|LINK
Mar 21, 2006 10:40 AM|Scolja|LINK
Mar 21, 2006 11:10 AM|NeoBTA|LINK
Did you try to put a Update panel to the toher controls that you want to render again ?
I mean i have 3 Updatepanels in 1 Page and all the callbacks refresh the content of all the Updatepanels.
Mar 21, 2006 11:27 AM|Scolja|LINK
Apr 10, 2006 10:43 PM|AlvinVi|LINK
Apr 19, 2006 02:56 PM|MBrookfield|LINK
I also have been have similar issues with the UpdatePanel and Postbacks. The problem, from my angle is fairly easily reproducibleas follows:
1) Create a project. Use the Web Projects Overlay:
2) Add a User Defined control (Master)
3) Add two nested User Defined Controls (NCtrl1, NCtrl2). NCtrl1 defaults to visible=true, NCtrl2 defaults to visible=false. Add some text to NCtrl2.
4) In the master control, add a public method to make visible/invisible the nested controls (NCtrl1, NCtrl2). Call it CtrlMeth1.
5) To NCtrl1 Add a GridView nested within an UpdatePanel Atlas mechanism.
6) In the GridView embed a standard Button server control in one of the columns.
7) Attach a public server side onclick event handler to that button.
8) In the Code Behind click event, call CtrlMeth1 to hide NCtrl1 and display NCtrl2. You will note that CtrlMeth1 executes as expected; including the directive to set NCtrl1.visible=false; NCtrl2.visible=true. However NCtrl2 is not displayed. NCtrl1 remains
the displayed view.
What appears to be happening here is that ScriptManager is preempting the normal __doPostback for controls embedded within an UpdatePanel. This is not always desirable, as in the above scenario. ScriptManager does provide a method called RegisterAsyncPostbackControl
which registers a control outside of a given UpdatePanel to be included within the Atlas Postback simulation. What is really needed here is to extend the functionality of RegisterAsyncPostbackControl to allow a given control to be UN-registered: to be excluded
from the Atlas Postback simulation. Armed with this mechanism it should then be possible for the developer to loop through a given control such as the GridView and remove registration for a given control type such as the Button control.
Apr 19, 2006 03:45 PM|Luis Abreu|LINK
do you mind copy/pasting the code here? thanks
Apr 19, 2006 04:17 PM|MBrookfield|LINK
I would have to strip out the essentials from within my application. However, having noted that Microsoft had closed out your posting (as mentioned above) without addressing the issue (said they could not reproduce the problem) and as it looks like I’m going
to have to go the hard way anyway, give me a day or so and you'll have it.
Thanks much for your posts.
Apr 19, 2006 06:01 PM|Luis Abreu|LINK
well, in fact, i've complained about it here and according to the team, i think that the issue has been solved though i really haven't tested it yet...
Apr 19, 2006 10:11 PM|MBrookfield|LINK
Apr 20, 2006 05:02 AM|Luis Abreu|LINK
well, if the problem still persist, then i think you can solve that by adding a dummy button with usesubmitbehavior property set to false and its display css style set to none (i think that by doing this you'll add the postback method during the initial
rendering and the problem won't happen - this if we're talking about the same problem ... )
Apr 20, 2006 09:05 AM|MBrookfield|LINK
Yep that sounds about right. Thanks! You could also probably inject the postback directly from the codebehind event handler:
string strTemp =
ClientScriptManager cs = inPage.ClientScript;
But all of this is a workaround and not a solution proper. When working with Beta releases, workarounds, as you know, can lead to a lot of problems down the road. As mentioned in a previous post, what’s really needed is a way to exclude a selection of controls
from the set of controls that are registered with Atas in the ScriptManager. This is why I would propose that the RegisterAsyncPostbackControl be modified to allow a control to be un-registered, ie: RegisterAsyncPostbackControl(ctrl1, [true/false]).
BTW, as promised, next post will be the code to reproduce the problem.
Apr 20, 2006 09:24 AM|Luis Abreu|LINK
since there's no public feedback center, then you should add another post with a title similar to this:
[BUG]: __doPostback isn't added during a partial postback; this may lead to errors if the method isn't added to the page during the initial rendering of the page
and then put a simple page that reproduces the problem.
i guess this might work...
Apr 20, 2006 09:36 AM|MBrookfield|LINK
As promised, here is the code to reproduce the problem. As mentioned in an earlier post, I am useing the 'Web Projects' overlay (CR1). Thios can be found at:
I have listed out the code here in detail by file. First create a new Web Project using the overlay. I'm not sure this will be absolutly necessary to reproduce the issue but that is how I have done it. Add a web form and call it MainPage. Then add three
We User Controls called: MainControl, NCtrl1 and NCtrl2. Add code as follows:
"-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
MainPage : System.Web.UI.Page
public PostbackProb.MainControl m_ctrlMain;
void Page_Load(object sender,
<h1>Main Container Control</h1>
MainControl : System.Web.UI.UserControl
void CtrlMeth1(string InCtrl)
if (InCtrl ==
ctrlN1.Visible = true;
ctrlN2.Visible = false;
ctrlN2.Visible = true;
ctrlN1.Visible = false;
runat="server" Text="Show Grid"
class NCtrl1 : System.Web.UI.UserControl
protected void Page_Load(object sender,
protected void showGrid_Click(object sender,
SqlConnection Conn =
new SqlConnection("workstation id=YourServer;initial catalog=Northwind;User ID=YourID;PWD=YourPassword");
string strSQL =
"select * from Region";
SqlCommand cmd =
new SqlCommand(strSQL, Conn);
cmd.CommandTimeout = 20;
SqlDataReader dr = cmd.ExecuteReader();
if (dr.HasRows ==
GridView1.Visible = true;
GridView1.DataSource = dr;
protected void GridView1_RowCommand(Object sender,
class NCtrl2 : System.Web.UI.UserControl
Jul 24, 2014 08:13 AM|CharlZA|LINK
Thanks for your help. I have been struggling for days to understand why my gridview was not updating with a partial postback after filling a form in another updatepanel inside a jQuery modal dialog. My UpdatePanel property Mode was set to "conditional"
and now it works after changing it to "always". Thanks