mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
* UpdatePanel.cs: implemented SingleChildControlCollection to be used in CreateControlCollection (). RequiresUpdate not only checks the update mode and explicit update requests, but also looks if any triggers fired. Initialize () initializes triggers only if partial rendering is supported by the ScriptManager. IsInPartialRendering property no longer returns the value of ScriptManager.IsInPartialRendering. Instead, it relies on the value of instance field which can be set using new internal SetInPartialRendering () method (called from ScriptManager.RenderPageCallback ()) Simplified the logic in RenderChildren (). * ScriptManager.cs: no need to register panels for refresh in OnPreRenderComplete, this is now done in RenderPageCallback. Modified HasBeenRendered () so that it doesn't query whether the panel has been explicitly updated by the user, but checks whether panel is in the list of panels to refresh. RaisePostDataChangedEvent () doesn't update the panel whose id is named in the POST request for refresh. This is handled in RenderPageCallback. Reverted the changes to WriteCallbackPanel and RenderFormCallback committed in r129774. RenderPageCallback now correctly detects panels to be refreshed (and thus included in the async response). * AsyncPostBackTrigger.cs, PostBackTrigger.cs: implemented HasTriggered (). svn path=/trunk/mcs/; revision=131511
64 lines
1.9 KiB
C#
64 lines
1.9 KiB
C#
//
|
|
// PostBackTrigger.cs
|
|
//
|
|
// Author:
|
|
// Igor Zelmanovich <[email protected]>
|
|
//
|
|
// (C) 2007 Mainsoft, Inc. http://www.mainsoft.com
|
|
//
|
|
//
|
|
// Permission is hereby granted, free of charge, to any person obtaining
|
|
// a copy of this software and associated documentation files (the
|
|
// "Software"), to deal in the Software without restriction, including
|
|
// without limitation the rights to use, copy, modify, merge, publish,
|
|
// distribute, sublicense, and/or sell copies of the Software, and to
|
|
// permit persons to whom the Software is furnished to do so, subject to
|
|
// the following conditions:
|
|
//
|
|
// The above copyright notice and this permission notice shall be
|
|
// included in all copies or substantial portions of the Software.
|
|
//
|
|
// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
|
|
// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
|
|
// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
|
|
// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
|
|
// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
|
|
// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
//
|
|
|
|
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
|
|
namespace System.Web.UI
|
|
{
|
|
public class PostBackTrigger : UpdatePanelControlTrigger
|
|
{
|
|
public new string ControlID {
|
|
get {
|
|
return base.ControlID;
|
|
}
|
|
set {
|
|
base.ControlID = value;
|
|
}
|
|
}
|
|
|
|
protected internal override bool HasTriggered ()
|
|
{
|
|
// Since this kind of trigger causes a normal postback, we never get
|
|
// triggered
|
|
return false;
|
|
}
|
|
|
|
protected internal override void Initialize () {
|
|
Control c = FindTargetControl (false);
|
|
ScriptManager sm = Owner.ScriptManager;
|
|
sm.RegisterPostBackControl (c);
|
|
}
|
|
|
|
public override string ToString () {
|
|
return String.Format ("PostBack: {0}", ControlID);
|
|
}
|
|
}
|
|
} |