[ExpectedException(typeof(NullReferenceException))] // since 2.0 RC :-( #endif public void IPostBackEventHandler_RaisePostBackEvent() { TestHtmlAnchor a = new TestHtmlAnchor(); a.ServerClick += new EventHandler(ServerClick); IPostBackEventHandler pbeh = (a as IPostBackEventHandler); serverClick = false; pbeh.RaisePostBackEvent("mono"); Assert.IsTrue(serverClick, "ServerClick"); }
protected virtual void RaisePostBackEvent(string argument) { base.ValidateEvent(this.UniqueID, argument); if (base.AdapterInternal != null) { IPostBackEventHandler adapterInternal = base.AdapterInternal as IPostBackEventHandler; if (adapterInternal != null) { adapterInternal.RaisePostBackEvent(argument); } } }
/// <devdoc> /// <para>[To be supplied.]</para> /// </devdoc> protected virtual void RaisePostBackEvent(string argument) { ValidateEvent(UniqueID, argument); if (AdapterInternal != null) { IPostBackEventHandler pbeh = AdapterInternal as IPostBackEventHandler; if (pbeh != null) { pbeh.RaisePostBackEvent(argument); } } }
protected virtual void RaisePostBackEvent (IPostBackEventHandler sourceControl, string eventArgument) { sourceControl.RaisePostBackEvent (eventArgument); }