Control.OnUnload(EventArgs) Method
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Raises the Unload event.
protected:
virtual void OnUnload(EventArgs ^ e);
protected public:
virtual void OnUnload(EventArgs ^ e);
protected virtual void OnUnload (EventArgs e);
protected internal virtual void OnUnload (EventArgs e);
abstract member OnUnload : EventArgs -> unit
override this.OnUnload : EventArgs -> unit
Protected Overridable Sub OnUnload (e As EventArgs)
Protected Friend Overridable Sub OnUnload (e As EventArgs)
Parameters
Examples
// Override the OnUnLoad method to set _text to
// a default value if it is null.
protected override void OnUnload(EventArgs e)
{
base.OnUnload(e);
if (_text == null)
_text = "Here is some default text.";
}
' Override the OnUnLoad method to set _text to
' a default value if it is null.
Protected Overrides Sub OnUnload(ByVal e As EventArgs)
MyBase.OnUnload(e)
If _text Is Nothing Then
_text = "Here is some default text."
End If
End Sub
Remarks
ASP.NET calls this method to raise the Unload event. If you are developing a custom control, you can override this method in order to provide additional processing. If you override this method, call the base control's OnUnload method to notify subscribers to the event.
Applies to
See also
Vertu í samstarfi við okkur á GitHub
Heimildina fyrir þetta efni er að finna á GitHub, þar sem þú getur líka búið til og farið yfir vandamál og sameinað beiðnir. Frekari upplýsingar er að finna í framlagshandbók okkar.