System.Web.UI.Page.RaisePostBackEvents C# (CSharp) Method

RaisePostBackEvents() private method

private RaisePostBackEvents ( ) : void
return void
	void RaisePostBackEvents ()
	{
		if (requiresRaiseEvent != null) {
			RaisePostBackEvent (requiresRaiseEvent, null);
			return;
		}

		if (formPostedRequiresRaiseEvent != null) {
			RaisePostBackEvent (formPostedRequiresRaiseEvent, null);
			return;
		}
		
		NameValueCollection postdata = _requestValueCollection;
		if (postdata == null)
			return;

		string eventTarget = postdata [postEventSourceID];
		IPostBackEventHandler target;
		if (String.IsNullOrEmpty (eventTarget)) {
#if NET_4_0
			target = AutoPostBackControl as IPostBackEventHandler;
			if (target != null)
				RaisePostBackEvent (target, null);
			else
#endif
			if (formPostedRequiresRaiseEvent != null)
				RaisePostBackEvent (formPostedRequiresRaiseEvent, null);
			else
				Validate ();
			return;
		}

		target = FindControl (eventTarget, true) as IPostBackEventHandler;
#if NET_4_0
		if (target == null)
			target = AutoPostBackControl as IPostBackEventHandler;
#endif
		if (target == null)
			return;

		string eventArgument = postdata [postEventArgumentID];
		RaisePostBackEvent (target, eventArgument);
	}
Page