Inheritance: System.EventArgs
コード例 #1
0
 /// <summary>
 /// When implemented by a class, enables a server control to process an event raised when a form is posted to the server.
 /// </summary>
 /// <param name="eventArgument">A <see cref="T:System.String" /> that represents an optional event argument to be passed to the event handler.</param>
 public void RaisePostBackEvent(string eventArgument)
 {
     if (OnPostBack != null)
     {
         var e = new PostBackEventArgs(eventArgument);
         OnPostBack(this, e);
     }
 }
コード例 #2
0
 /// <summary>
 /// Handles the OnPostBack event of the upnlContent control.
 /// </summary>
 /// <param name="sender">The source of the event.</param>
 /// <param name="e">The <see cref="PostBackEventArgs"/> instance containing the event data.</param>
 void upnlContent_OnPostBack( object sender, PostBackEventArgs e )
 {
     var parms = new Dictionary<string, string>();
     parms.Add("Area", e.EventArgument);
     NavigateToLinkedPage( "LocationPage", parms );
 }
コード例 #3
0
        /// <summary>
        /// Handles the OnPostBack event of the upnlContent control.
        /// </summary>
        /// <param name="sender">The source of the event.</param>
        /// <param name="e">The <see cref="PostBackEventArgs"/> instance containing the event data.</param>
        void upnlContent_OnPostBack( object sender, PostBackEventArgs e )
        {
            tbSearch.Text = string.Empty;

            if ( e.EventArgument == "R" )
            {
                int? campusId = CurrentCampusId.AsIntegerOrNull();
                if ( campusId.HasValue )
                {
                    NavData = GetNavigationData( CampusCache.Read( campusId.Value ) );
                }
                BuildNavigationControls();
            }
            else
            {
                if ( e.EventArgument.StartsWith( "P" ) )
                {
                    var parms = new Dictionary<string, string>();
                    parms.Add( "Person", e.EventArgument.Substring( 1 ) );
                    NavigateToLinkedPage( "PersonPage", parms );
                }
                else
                {
                    CurrentNavPath = e.EventArgument;
                    BuildNavigationControls();
                }
            }
        }
コード例 #4
0
 /// <summary>
 /// When implemented by a class, enables a server control to process an event raised when a form is posted to the server.
 /// </summary>
 /// <param name="eventArgument">A <see cref="T:System.String" /> that represents an optional event argument to be passed to the event handler.</param>
 public void RaisePostBackEvent( string eventArgument )
 {
     if ( OnPostBack != null )
     {
         var e = new PostBackEventArgs( eventArgument );
         OnPostBack( this, e );
     }
 }