-
Notifications
You must be signed in to change notification settings - Fork 1.5k
/
IPostBackEventHandler.xml
81 lines (68 loc) · 5.1 KB
/
IPostBackEventHandler.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
<Type Name="IPostBackEventHandler" FullName="System.Web.UI.IPostBackEventHandler">
<TypeSignature Language="C#" Value="public interface IPostBackEventHandler" />
<TypeSignature Language="ILAsm" Value=".class public interface auto ansi abstract IPostBackEventHandler" />
<TypeSignature Language="DocId" Value="T:System.Web.UI.IPostBackEventHandler" />
<TypeSignature Language="VB.NET" Value="Public Interface IPostBackEventHandler" />
<TypeSignature Language="F#" Value="type IPostBackEventHandler = interface" />
<TypeSignature Language="C++ CLI" Value="public interface class IPostBackEventHandler" />
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<Interfaces />
<Docs>
<summary>Defines the method ASP.NET server controls must implement to handle postback events.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
To create a server control that captures form submission information from the browser, you must implement this interface. For more information on how to use this interface, see [Server Event Handling in ASP.NET Web Forms Pages](https://learn.microsoft.com/previous-versions/aspnet/xax2hw3x(v=vs.100)).
## Examples
The following code example defines a custom button server control that causes postback, captures the postback event using the <xref:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent%2A> method, and raises a `Click` event on the server.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic IPostBackEventHandler Example/CS/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic IPostBackEventHandler Example/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/xax2hw3x(v=vs.100)">Server Event Handling in ASP.NET Web Pages</related>
</Docs>
<Members>
<Member MemberName="RaisePostBackEvent">
<MemberSignature Language="C#" Value="public void RaisePostBackEvent (string eventArgument);" />
<MemberSignature Language="ILAsm" Value=".method public hidebysig newslot virtual instance void RaisePostBackEvent(string eventArgument) cil managed" />
<MemberSignature Language="DocId" Value="M:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent(System.String)" />
<MemberSignature Language="VB.NET" Value="Public Sub RaisePostBackEvent (eventArgument As String)" />
<MemberSignature Language="F#" Value="abstract member RaisePostBackEvent : string -> unit" Usage="iPostBackEventHandler.RaisePostBackEvent eventArgument" />
<MemberSignature Language="C++ CLI" Value="public:
 void RaisePostBackEvent(System::String ^ eventArgument);" />
<MemberType>Method</MemberType>
<AssemblyInfo>
<AssemblyName>System.Web</AssemblyName>
<AssemblyVersion>1.0.5000.0</AssemblyVersion>
<AssemblyVersion>2.0.0.0</AssemblyVersion>
<AssemblyVersion>4.0.0.0</AssemblyVersion>
</AssemblyInfo>
<ReturnValue>
<ReturnType>System.Void</ReturnType>
</ReturnValue>
<Parameters>
<Parameter Name="eventArgument" Type="System.String" />
</Parameters>
<Docs>
<param name="eventArgument">A <see cref="T:System.String" /> that represents an optional event argument to be passed to the event handler.</param>
<summary>When implemented by a class, enables a server control to process an event raised when a form is posted to the server.</summary>
<remarks>
<format type="text/markdown"><![CDATA[
## Remarks
The page passes the value of the `eventArgument` parameter to the `RaisePostBackEvent` method of the control that implements the <xref:System.Web.UI.IPostBackEventHandler> interface. This control also renders the HTML element that causes the postback to occur. If the control renders client-side script for postback, the argument from the script is passed in the `eventArgument` parameter. If the postback is caused by a simple submit operation, the `eventArgument` parameter is `null`.
This method provides the functionality for many events implemented by HTML and Web server controls.
## Examples
The following code example defines a custom button server control that causes postback, captures the postback event using the <xref:System.Web.UI.IPostBackEventHandler.RaisePostBackEvent%2A> method, and raises a `Click` event on the server.
:::code language="csharp" source="~/snippets/csharp/VS_Snippets_WebNet/Classic IPostBackEventHandler Example/CS/source.cs" id="Snippet1":::
:::code language="vb" source="~/snippets/visualbasic/VS_Snippets_WebNet/Classic IPostBackEventHandler Example/VB/source.vb" id="Snippet1":::
]]></format>
</remarks>
<related type="Article" href="https://learn.microsoft.com/previous-versions/aspnet/xax2hw3x(v=vs.100)">Server Event Handling in ASP.NET Web Pages</related>
</Docs>
</Member>
</Members>
</Type>