WebBrowserNavigatingEventHandler.cs source code in C# .NET

Source code for the .NET framework in C#

                        

Code:

/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / WinForms / Managed / System / WinForms / WebBrowserNavigatingEventHandler.cs / 1 / WebBrowserNavigatingEventHandler.cs

                            //------------------------------------------------------------------------------ 
// 
//     Copyright (c) Microsoft Corporation.  All rights reserved.
// 
//----------------------------------------------------------------------------- 

 
using System.Net; 
using System.ComponentModel;
 
namespace System.Windows.Forms {

    /// 
    ///  
    ///     
    /// Delegate to the WebBrowser Navigating event. 
    ///      
    /// 
    public delegate void WebBrowserNavigatingEventHandler(object sender, WebBrowserNavigatingEventArgs e); 

    /// 
    /// 
    ///     
    /// Provides data for the  event.
    ///     
    ///  
    public class WebBrowserNavigatingEventArgs : CancelEventArgs {
        private Uri url; 
        private string targetFrameName;

        /// 
        ///  
        ///    
        /// Creates an instance of the  class. 
        ///     
        /// 
        public WebBrowserNavigatingEventArgs(Uri url, string targetFrameName) { 
            this.url = url;
            this.targetFrameName = targetFrameName;
        }
 
        /// 
        ///  
        ///     
        /// Url the browser is navigating to.
        ///     
        /// 
        public Uri Url {
            get {
                WebBrowser.EnsureUrlConnectPermission(url); 
                return this.url;
            } 
        } 

        ///  
        /// 
        ///    
        /// In case an individual frame is about to be navigated, this contains the frame name.
        ///     
        /// 
        public string TargetFrameName { 
            get { 
                WebBrowser.EnsureUrlConnectPermission(url);
                return this.targetFrameName; 
            }
        }
    }
 
}
 

// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
                        

Link Menu

Network programming in C#, Network Programming in VB.NET, Network Programming in .NET
This book is available now!
Buy at Amazon US or
Buy at Amazon UK